flatten a list of list

Bearophile bearophileHUGS at lycos.com
Sun Aug 16 14:24:36 CEST 2009

Chris Rebert:
> The OP asked for "simple", not "best", "most proper", or "fastest". My
> comment was intended to mean that the code was marginally *simpler*,
> not faster.

Yep, the OP has asked for simple code. But often this is not the right
way to solve this situation. A better way is to create (or copy) a
flatten that's efficient and well tested & debugged, put it into some
library of utilities, and then use import&use it when it's needed.


More information about the Python-list mailing list