In my Python 2.7.2 IDLE interpreter:
>>> mylist = [1, 2, 3, 4, 5] >>> for item in mylist: mylist.remove(item) >>> mylist [2,
You are modifying your list while you are looping through it, which is very bad practice.