You can have a check like this..
if pin in correct_pin.values(): print ("Correct! You are now logged in, ") for n,k in correct_pin.items(): if k == pin: print(n) #This will print the name which is mapped to the key