+ 2
Get key by value in python dictionary
german_english = {"easy": "einfach", "big": "groß", "soft": "weich"} Print(german_english["easy"]) My output will be "einfach" that is the value of the key "easy", but now I want to get the key as an output by inserting the value. For example, I want the output "easy", if I want to input the value "einfach". How to do it?
1 Odpowiedź