Possible Duplicate:
Flattening a shallow list in Python
Flatten (an irregular) list of lists in Python
EDIT: The question is not how to do it - this has been discussed in other questions - the question is, which is the fastest method?
I've found solutions before, but I'm wondering what the fastest solution is to flatten lists which contain other lists of arbitrary length.
For example:
[1, 2, [3, 4, [5],[]], [6]]
Would become:
[1,2,3,4,5,6]
There can be infinitely many levels. Some of the list objects can be strings, which mustn't be flattened into their sequential characters in the output list.