filter lines from a text file 'textfile' which contain a word 'apple',[line for line in open('textfile') if 'apple' in line]