[Tutor] Removing itens from a list

Sean 'Shaleh' Perry shalehperry@attbi.com
Tue, 15 Jan 2002 17:45:00 -0800 (PST)


>>> no_oranges = lambda s: re.search(r'orange', s, re.IGNORECASE) == None
>>> filter(no_oranges, l)
['I like apple']

And since everyone gave you an example without a regular expression, I went
ahead and made one.

This is similar to the has_oranges mail earlier.