# with Regular Expression
import re
fruit_list = open('test.txt')
search_words = ['apple', 'banana', 'orange', 'lemon']
patten = re.compile("(.*(apple|banana|orange|lemon)(.*))")
for i in [re.search(patten,line).groups() for line in fruit_list if re.search(patten,line) != None]: print(i)