mylist = [0,1,1,2,2,3,3,3,3,4,5,6,7,7,8,8,9,10,10,11,22,33,22] from collections import Counter c = Counter() for i in mylist: c[i] = c[i] +1 print(c)
mylist = [0,1,1,2,2,3,3,3,3,4,5,6,7,7,8,8,9,10,10,11,22,33,22] from collections import Counter c = Counter() for i in mylist: c[i] = c[i] +1 print(c)