looping over more than one list

EleSSaR^ usenetpublic-elessar.xyz at yahoo.it
Thu Feb 16 10:28:09 EST 2006


Iain King si è profuso/a a scrivere su comp.lang.python tutte queste
elucubrazioni: 

[cut]

I think you should take a look at the zip() function.

You can use for with it like this:

for elem1, elem2, elem3 in zip(list1, list2, list3):
....



-- 
Alan Franzoni <alan.franzoni.xyz at gmail.com>
-
Togli .xyz dalla mia email per contattarmi.
Rremove .xyz from my address in order to contact me.
-
GPG Key Fingerprint:
5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E



More information about the Python-list mailing list