I wanted to search through a csv file that will look up keywords from a list within the first two columns. I've managed to get it to work when a key word is found, but wanted to have a message if no keywords found. Unfortunately the message "not found" comes out four times. I just wanted this to come out once. Please can you help? What it's doing is going around each key word again.
import csv
keywords=["none","blank","off","screen","blank"]
f=open("CSVSolutions.csv")
for row in csv.reader(f):
for keyword in keywords:
if keyword == row[0] or keyword == row[1]:
print(row[2])
break
else:
print ("not found")
break
f.close
f.close->f.close()