It's pretty simple to start it from 1 other than 0:
for index, item in enumerate(iterable, start=1):
print index, item # Used to print in python<3.x
print(index, item) # MirateMigrate to print() after 3.x+
It's pretty simple to start it from 1 other than 0:
for index, item in enumerate(iterable, start=1):
print index, item # Used to print in python<3.x
print(index, item) # Mirate print() after 3.x+
It's pretty simple to start it from 1 other than 0:
for index, item in enumerate(iterable, start=1):
print index, item # Used to print in python<3.x
print(index, item) # Migrate to print() after 3.x+
print() function modified according to python 3.x+