<snip>
> Use the enumerate() builtin.
>
>     >>> l = ['a', 'b', 'c']
>     >>> for i, v in enumerate(l):
>     ...     print i, v
>     ...
>     0 a
>     1 b
>     2 c
>
> --


Just for my own sanity: Isn't this the third response advocating the
use of enumerate()? Did the other responses not get through, or was
this a time-delay thing?

Thanks,
Shawn
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to