So I am trying to receive the Key from the dictionary when a user inputs the key itself or the value of the key in python.
dict= {'1':'one','2':'two','3':'three','4':'four','5':'five'}
userinput = input('Please choose from the dictionary : ')
for key, values in dict.items():
if userinput == key or values:
print (key)
So I was thinking the when the user entered 'two' to be '2' or when user entered '5' to be '5'
But rather I am getting the key it self