Python Language Filter

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!


  • filter(function, iterable)
  • itertools.ifilter(function, iterable)
  • future_builtins.filter(function, iterable)
  • itertools.ifilterfalse(function, iterable)
  • itertools.filterfalse(function, iterable)


functioncallable that determines the condition or None then use the identity function for filtering (positional-only)
iterableiterable 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().

Got any Python Language Question?