Introduction
The filter() function helps you pick items from a list (or other collections) that match a rule you set. It keeps only the items you want.
When you want to get only even numbers from a list of numbers.
When you need to find all words longer than 5 letters in a list of words.
When you want to remove empty strings from a list of text.
When you want to select only active users from a list of user data.