Aug-07-2019, 06:35 PM
I am trying to make my dictionary produce an error message stating "FAQ already exists" not working. I think the comand is right just maybe not the placement
if option == 1: question = input("\nEnter a question to be added: ") answer = input("\nThe answer to the question is: ") FAQ[question] = answer print('Your FAQ has been added. ') item = question if item in FAQ: print('FAQ already exists')