newbie: how to loop through multiple lists

Alexander Eisenhuth newsuser at stacom-software.de
Wed Oct 2 06:06:58 EDT 2002


Hallo alltogether,

is there a expression to loop through two lists in one iteration? For instance:

--
l1 = ['a', 'b', 'c', 'd']
l2 = [ 1,  2,    3,   4]

for lChar, lNumb in (l1, l2):
	print lCnt, ':', lChar
--
I hope you understand what I need .

Thanks a lot

Alexander




More information about the Python-list mailing list