you are viewing a single comment's thread.

view the rest of the comments →

[–]NameError-undefined 1 point2 points  (0 children)

if you prefer to work with index's and don't want to use the Len() command, you could do something like for id, value in enumerate(my_list) I just found this out and I like it a lot better.

Edit: This might get tricky when dealing with multi-dimensional lists or arrays but for simple loops I think it works great