print all keys having same value

Solutions on MaxInterview for print all keys having same value by the best coders in the world

showing results for - "print all keys having same value"
Arman
06 Sep 2019
1dict = {"Jim": "y", "Bob": "y", "Ravioli": "n"}
2In [26]: [k for k,v in dict1.items() if v == 'y']
3Out[26]: ['Bob', 'Jim']