Removal of element from list while traversing causes the next element to be skipped

William McBrine wmcbrine at users.sf.net
Fri Feb 1 12:22:46 EST 2008


On Wed, 30 Jan 2008 06:07:45 -0800, cokofreedom wrote:

> Anyone else noticed that the OP has not actually replied to any of the
> suggestions...

Sorry. I was just fascinated at the turns it was taking. But the first 
answer was fine for me:

for name in apps[:]:
  etc.

Thanks all.

-- 
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 -- pass it on



More information about the Python-list mailing list