simple iterator question

andrew cooke andrew at acooke.org
Thu Apr 2 10:32:13 EDT 2009


Sion Arrowsmith wrote:
> Neal Becker  <ndbecker2 at gmail.com> wrote:
>>How do I interleave 2 sequences into a single sequence?
>>
>>How do I interleave N sequences into a single sequence?
>
> itertools.chain(*itertools.izip(*Nsequences))

aha!  thanks.  andrew




More information about the Python-list mailing list