Looping on more than one list

ahmed Bouferguene aboufer at atlsci.com
Sat Jul 22 12:08:21 EDT 2000


Greetings all,

    Do no know much of python, but I am wondering whether it is possible
to loop
on more than one list, something like,

a = [1,2,34]
b=["a", "b", "d"]

for x in a, y in b :
    print x, y

and the loop exits when the shortest list is exhausted

Thanks




More information about the Python-list mailing list