I am relatively new to python and was working on a project to enhance my skills, it was a text file compressor; I am having problems with the file scanning portion, I want it to read a text file and find a word. Any help would be much appreciated.
My code:
def check():
datafile = file("res\powerserv 1.txt")
for line in datafile:
if storage in line:
return true
else:
return false