| Parameter | Details |
|---|---|
| function | callable that determines the condition or None then use the identity function for filtering (positional-only) |
| iterable | iterable that will be filtered (positional-only) |
In most cases a comprehension or generator expression is more readable, more powerful and more efficient than filter() or ifilter().