Nick Coghlan wrote:
> I think this is about the best you can do for an in-place version:
>    for i, x in enumerate(reversed(lst)):
>      if x == 2:
>        del lst[-i]
I think del lst[-i-1] might be functionally better.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to