python Counter
a=[1,2,3,3,3,3,3,5,6,7,7,7,8,8]Counter(a)Counter({1: 1, 2: 1, 3: 5, 5: 1, 6: 1, 7: 3, 8: 2})mostn=Counter(a).most_common(2)mostnOut[185]: [(3, 5), (7, 3)]mostn[0][0]Out[186]: 3mostn[0][1]Out[187]: