for index, item in enumerate(things):
print index, item
We can access to the item through the index:
for index in range(len(things)):
print index, things[index]
With the second example we have a variable less, but the same power
for index, item in enumerate(things):
print index, item
We can access to the item through the index:
for index in range(len(things)):
print index, things[index]
With the second example we have a variable less, but the same power