Enumerate list / get index in for loop

less than 1 minute read

Enumerate list / get index in for loop

for idx, val in enumerate(list):
    print(idx, val)

Leave a comment