Having an issue with checking if user input is in a dictionary.
Basics of program is there's a shop inventory. The items are stored in a dictionary with corresponding values e.g. {'kettle': 3,.....}
Then I want user to write what they want. So if the user has entered 'kettle' I want to remove the item from the shop inventory and put in user inventory.
The main problem right now is just getting an if statement together. This is what I'm trying:
user_choice = input('What would you like to buy? ')
if user_choice in shop_inventory:
print('Complete')
else:
print('Fail')
How can I get the program to print "Complete"?