Nick Coghlan wrote:The effbot's version is still going to be faster though: lst = [x for x in lst if x != 2]
Have you measured this?
Nope. I'm going purely on the fact that it is O(n), and the in-place modification will always be worse than that.
Cheers, Nick.
-- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://boredomandlaziness.skystorm.net -- http://mail.python.org/mailman/listinfo/python-list