guys. I\'m trying to find the most elegant solution to a problem and wondered if python has anything built-in for what I\'m trying to do.
What I\'m doing is this. I
You can find a good answer in itertools' recipes:
def flatten(listOfLists): return list(chain.from_iterable(listOfLists))
(Note: requires Python 2.6+)