from collections import Counter
l = [1,3,4,7,3,2,6,9,5,0,3,6,1,6,3,8,6,7,2,5]
c = Counter(l)
c
Counter({1: 2, 3: 4, 4: 1, 7: 2, 2: 2, 6: 4, 9: 1, 5: 2, 0: 1, 8: 1})
c.most_common()
[(3, 4), (6, 4), (1, 2), (7, 2), (2, 2), (5, 2), (4, 1), (9, 1), (0, 1), (8, 1)]
c.most_common(3)
[(3, 4), (6, 4), (1, 2)]