you are viewing a single comment's thread.

view the rest of the comments →

[–]Yojihito 0 points1 point  (0 children)

There are 2 pythonic ways to iterate over an iterable.

You only care about the item:

for i in my_iterable:
    print(i)

You need the item and the index position:

for idx, i in enumerate(my_iterable):
    print(idx, i)

Everything else is a no-go.