On May 10, 6:51 am, [EMAIL PROTECTED] wrote:
...
> into a list of tuples to allow moving through multiple lists, or is
> the for i in range(len(listkeys)): the only solution?
>
> Any suggestions?

For the specific case of indexing lists, the following is cleaner than
the 'for i in range...' solution above, and works in cases where
zipping the lists may not be appropriate:

for i, item in enumerate(mylist):
    print "%s) My item: %s; My other item: %s" % (i, item,
my_non_iterable_object.thing_at(i))

--
Ant.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to