zip 2 sequences into 1

Neal Becker ndbecker2 at verizon.net
Wed Apr 21 19:51:08 EDT 2004


What's an easy/efficient way to zip together 2 (or more) sequences into a
single sequence?

I noticed zip builtin.  This combines

a_0 ... a_n
b_0 ... b_n

into

(a_0 b_0)(a_1 b_1)...

What I want is a single sequence

a_0 b_0 a_1 b_1...






More information about the Python-list mailing list