from collections import Counter data = [1,1,1,2,2,5,5,5,5,5,3] result = Counter(data).most_common() 출력 [(5, 5), (1, 3), (2, 2), (3, 1)]