Filter
suggest changeSyntax
filter(function, iterable)
itertools.ifilter(function, iterable)
future_builtins.filter(function, iterable)
itertools.ifilterfalse(function, iterable)
itertools.filterfalse(function, iterable)
Parameters
function
| callable that determines the condition orNone
then use the identity function for filtering (positional-only)iterable
| iterable that will be filtered (positional-only)
Remarks
In most cases a comprehension or generator expression is more readable, more powerful and more efficient than filter()
or ifilter()
.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents