I have a function to pick out lumps from a list of strings and return them as another list:
def filterPick(lines,regex): result = [] for l in lines:
>>> "a" in "a visit to the dentist" True >>> "a" not in "a visit to the dentist" False
That also works with a search query you're hunting down in a list
`P='a', 'b', 'c'
'b' in P` returns true