flatten a list of list
Bearophile
bearophileHUGS at lycos.com
Sun Aug 16 08:24:36 EDT 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.
Bye,
bearophile
More information about the Python-list
mailing list