Partition list with predicate

Tim Golden mail at timgolden.me.uk
Wed Apr 23 13:15:52 EDT 2008


Jared Grubb wrote:
> I want a function that removes values from a list if a predicate 
> evaluates to True. The best I could come up with is:

Have a look at the itertools module, and the ifilter function
in particular.

TJG



More information about the Python-list mailing list