Flattening lists

mk mrkafk at gmail.com
Thu Feb 5 11:07:10 EST 2009

Michele Simionato wrote:

> Looks fine to me. In some situations you may also use hasattr(el,
> '__iter__') instead of isinstance(el, list) (it depends if you want to
> flatten generic iterables or only lists).

Thanks! Such stuff is what I'm looking for.


More information about the Python-list mailing list