infile = open ('Ques.txt') word_list = ['cat', 'dog', 'ant', 'mouse']
result_words = []
для строки в infile: если все ((line.lower (). find (word.lower ())) <= 0 для слова в word_list): result_words.append (line) print (result_words) </p>