Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- some_dict = {64630: 1, 11735: 1, 14216: 1, 99233: 1, 14470: 1, 4978: 2, 73429: 1, 38120: 1, 51135: 1, 67060: 1}
- for key,value in mode_dict.items():
- if value == max(mode_dict.values()):
- return key
- d = {1: 1, 2: 2, 3: 2, 4: 4}
- dd = list(d.values())
- res = max([(dd.count(s), s) for s in set(dd)], key=lambda x: x[0])
- if res[0] > 1:
- print(res[1])
- else:
- print(min(dd))
Add Comment
Please, Sign In to add comment