list.without()?

Andreas Jung ajung at sz-sb.de
Tue Nov 16 07:19:38 CET 1999


On Tue, Nov 16, 1999 at 01:03:44AM +0100, Magnus L. Hetland wrote:
> 
> Hi!
> 
> Is there a function or method in the standard language that can
> non-destructively return a list without a specified element? Would it
> be possible to add it as a method to lists?

mylist = filter(lambda x: x != ItemToRemove , mylist)

or something similar .... 




More information about the Python-list mailing list