enumerate list code example
Example 1: python enumerate for loop
presidents = ["Washington", "Adams", "Jefferson", "Madison", "Monroe", "Adams", "Jackson"]
for num, name in enumerate(presidents, start=1):
print("President {}: {}".format(num, name))
Example 2: python enumerate list
>>> for count, value in enumerate(values):
... print(count, value)
...
0 a
1 b
2 c