Hi all,

>>> a = [12, 12, 1321, 34, 23, 12, 34, 45, 77]
>>> for x in a:
...   if x == 12:
...     a.remove(x)
>>> a
[1321, 34, 23, 12, 34, 45, 77]

Can any one explain me how the remove works and how it is effecting the for 
loop.

Kushal
-- 
Fedora Ambassador, India
http://kushaldas.in
http://dgplug.org (Linux User Group of Durgapur)

_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to