list comprehencion filter code example
Example 1: using list comprehension to filter out age group pandas
[ pers for pers in world if all([f(pers) for f in predicates]) ]
Example 2: using list comprehension to filter out age group pandas
l = [person for person in world if re.search(person.name, '.*Smith') and person.gender = 'm' and person.age < 20]