enumerate example

Andreas Jung andreas at andreas-jung.com
Fri Jul 4 04:30:56 EDT 2003


for num ,item in enumerate( ['a','b','c']):
    print num, item

0 a
1 b
2 c

--On Freitag, 4. Juli 2003 18:19 Uhr +1100 Egor Bolonev <ebolonev at rol.ru> 
wrote:

> Hello, All!
>
> Any useful example for enumerate, please.
>
> With best regards, Egor Bolonev.  E-mail: ebolonev at rol.ru [ru eo en]
>
> --
> http://mail.python.org/mailman/listinfo/python-list









More information about the Python-list mailing list