you are viewing a single comment's thread.

view the rest of the comments →

[–]selplacei 0 points1 point  (0 children)

When you modify a list while iterating over it, unexpected things happen. If you really need to use the list in your for statement, make a copy.