use python list comprehension with if isof filter