Can someone please explain what is happening in the output below? The
number 3 never gets printed. Does Python make a copy of a list before
it iterates through it?:
>>> e = range(1,5)
>>> for i in e:
        print i
        if i == 2 :
                e.remove(i)


1
2
4
>>> e
[1, 3, 4]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to