iterating over two arrays in parallel?

mh at pixar.com mh at pixar.com
Fri Aug 29 03:24:38 CEST 2008


I want to interate over two arrays in parallel, something like this:

    a=[1,2,3]
    b=[4,5,6]

    for i,j in a,b:
        print i,j

where i,j would be 1,4,    2,5,   3,6  etc.

Is this possible?

Many TIA!
Mark

-- 
Mark Harrison
Pixar Animation Studios



More information about the Python-list mailing list