Below is a part of my program which allows me to search for a word in a given text. However I would like to search for multiple words, or even be able to enter a sentence instead of just a word.
Thank you for any help you can provide.
def word_search():
word = raw_input("Enter the word to search> ")
for subtext in data:
if re.search(r"\b%s\b" % word, subtext, re.I):
print "FOUND", subtext