Loop three lists at the same time?

kelvin.you at gmail.com kelvin.you at gmail.com
Wed Nov 14 05:37:21 CET 2007


On 11 13 ,   6 46 , Davy <zhushe... at gmail.com> wrote:
> Hi all,
>
> I have three lists with the same length. Is there any method to loop
> the three lists without a loop counter?
>
> Best regards,
> Davy

Maybe you just need this:-)
>>> list1 = [1, 2, 3]
>>> list2 = [4, 5, 6]
>>> list3 = [7, 8, 9]
>>> for i in list1+list2+list3:
...    print i
...




More information about the Python-list mailing list