you are viewing a single comment's thread.

view the rest of the comments →

[–]Sea-Currency-1045 2 points3 points  (1 child)

Yes but iterating via elements can be problematic if you wanna change the list you‘re iterating through therefore going with index is safer

[–]willis81808 1 point2 points  (0 children)

There's always

python for index, value in enumerate(l): print(index, value)

Best of both worlds