> folks
> I have two lists
>
>  i am trying to loop thorough them simultenously.
>
> Here is the code i am using

[...]

> Is there any efficient doing this
>

Try the zip function:

>>> list1 = [ 'a', 'b', 'c' ]
>>> list2 = [ 'A', 'B', 'C' ]
>>> for i, j in zip( list1, list2 ):
...     print i, j
...
a A
b B
c C
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to