Filtering Iterables With Python
Python’sfilter() is a built-in function that allows you to process an iterable and extract those items that satisfy a given condition. This process is commonly known as afiltering operation. Withfilter(), you can apply afiltering function to an iterable and produce a new iterable with the items that satisfy the condition at hand. In Python,filter() is one of the tools that you can use forfunctional programming.
In this video course, you’ll learn how to:
- Use Python’s
filter()in your code - Extractneeded values from your iterables
- Combine
filter()with otherfunctional tools - Replace
filter()with morePythonic tools
With this knowledge, you’ll be able to usefilter() effectively in your code. Alternatively, you have the choice of usinglist comprehensions orgenerator expressions to write morePythonic and readable code.
To better understandfilter(), it would be helpful for you to have some previous knowledge oniterables,for loops,functions, andlambda functions. You can also refresh your memory of lambda functions through avideo course.
What’s Included:
- 13 Lessons
- Video Subtitles and Full Transcripts
- 2 Downloadable Resources
- Accompanying Text-Based Tutorial
- Q&A With Python Experts: Ask a Question
- Certificate of Completion
Downloadable Resources:
Related Learning Paths:
Get Started With filter()
5 Lessons 19m
Use filter() for Functional Programming
5 Lessons 26m
Code With Pythonic Style
3 Lessons 9m
AboutNegar Vahid
Negar is a researcher in quantum computing and explainable AI, and a content creator at Real Python.
» More about Negar












