I have to write a function which can search a txt file for a phrase then print every line that contains the phrase.
def find_phrase(filename,phrase):
for line in open(filename):
if phrase in line:
print line,
That is what I have at the moment and it only prints the first instance.