I am trying to make a programme which diagnoses a computer problem based on user input and checks for keywords. I want the keywords to be in a text file. This is the code I have so far, but it reads the keywords from the variable d
, not from a text file.
d = {'screen': 'Get a new screen', ...}
problem = input('What did you do? ').lower()
for k in d:
if k in problem:
print(d[k])