How to write all the sentences with the word "apple" from a txt file
How to write all the sentences with the word "apple" from a txt file Question: I have tried this using regex, loops and simple functions as well but cannot figure out anything. here are the few codes I have tried. import re fp = open("apple.txt") re.findall(r"([^.]*?apple[^.]*.)",fp) Asked By: chaitanya chitturi || Source Answers: with open("./WABA-crash.txt", …