enumerate and range python code example
Example: enumerate in range python
enumerated = list(enumerate(range(3), 1))
print(enumerated)
OUTPUT:
[(1, 0), (2, 1), (3, 2)]
enumerated = list(enumerate(range(3), 1))
print(enumerated)
OUTPUT:
[(1, 0), (2, 1), (3, 2)]