On Wednesday 09 July 2008 09:26:09 pm Anand Chitipothu wrote: > It never iterated over the second the 12. When x=12 for the last time, > there was still a 12 at the begining of the list. (try printing the > list also for every iteration). > > It internally maintains an index for iteration. If you have a list > with values [x, y, z] and if you remove x in the first iteration, the > list becomes [y, z]. In the next iteration it returns the second > element, which is z. so y never gets a chance to be part of the > iteration. So that in-memory is the prime accused here.
Kushal -- Fedora Ambassador, India http://kushaldas.in http://dgplug.org (Linux User Group of Durgapur) _______________________________________________ BangPypers mailing list [email protected] http://mail.python.org/mailman/listinfo/bangpypers
