I have a problem with else statement. How to make the code print not found? it keep print not found
import os f = open(\'D:/Workspace/snacks.txt\', \"r\"); clas
with open('foo') as f: lines = f.readlines() for line in lines: if 'chocolate' in line.lower(): print "Found: ", line elif 'milkshake' in line.lower(): print "Found: ", line else: print "Not Found."