Run
input = ['apple', 'banana', 'cherry'] output = [x for x in input if 'a' in x] print(output)
Output