summaryrefslogtreecommitdiff
path: root/progs/unparsable_programs/a493.py
blob: 430263c2a5ead9926df1416fa5caa70a3ab3f760 (plain)
1
2
3
4
5
6
7
from collections import defaultdict
def max_occurrences(nums):
    dict = defaultdict(int)
    for i in nums:
        dict[i] += 1
    result = max(dict.items(), key=lambda x: x[1]) 
    return result