In a message of Thu, 18 Jun 2015 04:40:05 -0000, Anubhav Yadav writes: >So I need to create a copy of the list before trying to iterate through the >list. >Thanks a lot everyone for their answers.
Er, I think you understand, but what you need to do is to make a copy of the list, and _interate through the copy_ if you want to remove things from your list. If you aren't modifying the list in the loop/function/method/whatever then you don't need a copy. I think you already got it, but "what you said" != "what you meant". :) Laura _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor