how to iterate all sub-element in a list

Skip Montanaro skip at pobox.com
Fri Jan 31 05:29:27 EST 2014


Google for "python flatten list."

This question comes up frequently, though I'm not sure if that's
because it's a common homework problem or because people are unaware
of the += operator (or extend method) for lists, and so build
lists-of-lists when they could just build them flat in the first
place.

Skip



More information about the Python-list mailing list