This is my current code:
StockSearch = input("Search For Product (Name Or Code):\n")
with io.open('/home/jake/Projects/Stock','r', encoding='utf8') as f:
for line in f:
Read = f.readline()
while Read!='':
if StockSearch == Read:
print (Read)
I'm trying to get python to keep reading every line of the file until there are none left and match the user's input with one of the lines, if not it'll print an error code.
Thank you in advance.