enumerate example

Andreas Jung andreas at andreas-jung.com
Fri Jul 4 10:30:56 CEST 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