Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1.  
  2. my_dict = {'a': 1, 'b': 2, 'c': 3}
  3.  
  4. maximum = max(my_dict.values())
  5.  
  6. for key, value in my_dict.items():
  7. if value == maximum:
  8. print 'key of max value is:', key
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement