Miscellany
public python v1 · immutableresult_found = any(['foo' in x for x in os.listdir('something') if os.path.isfile(x)])# The above is the same as what is belowresults = []for entry in os.listdir('something'): if os.path.isfile(entry): if 'foo' in entry: results.append(True) else: results.append(False)