+ 1
How to count number of duplicate values in list ?
2 Respostas
+ 5
len(list(filter(lambda x: l. count(x) >2,l))) if l is your list
+ 3
lst = [1,0,0,1,1,2,0,2,4,1,4,5]
d = dict.fromkeys(lst, 0)
for k in lst: d[k] += 1
print(*d.items())
>>> (1, 4) (0, 3) (2, 2) (4, 2) (5, 1)