getting an item's list index
xantor at linux.be
Sat Apr 19 14:57:45 CEST 2003
I have a list called contents. If one of the elements has the value
"item1" for example, how can I get that elements index?
for item in contents:
# here I need to get that items index
Michael Anckaert, aka The XanTor
OpenPGP key: F7A6C3AB
Fingerprint: A329 43FC 3953 A944 5DDC 2E05 8E5D AD60 F7A6 C3AB
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 196 bytes
Desc: This is a digitally signed message part
More information about the Python-list