On Jul 22, 8:25 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> if there's only one level of recursion, and the lists aren't too long,
> you can simply do:
>
>      sum(list_of_lists, [])
>
> (this has quadratic performance, so don't use it for large structures)

For linear performance, you can use itertools:

      list(itertools.chain(*list_of_lists))

Raymond
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to