In this lesson, you’ll see how you can ensure that your filtered down data is safely stored in a tuple, which is an immutable data structure. You’ll use the
tuple() function and wrap it around
filter(). Now you have all of the elements generated by this iterator stored inside a tuple.
Then you’ll walk through another quick example to review how you can use
filter() to see which items in your data set meet specific criteria. You’ll be using
lambda expressions again.
Choong Han on March 31, 2020
Is it possible to set the condition as a range in the lambda function like the year of when their are born is larger than 1900?