Python Flatten Arbitrarily Nested List