Contact: aviboots(AT)netvision.net.il
39,907 questions
51,839 answers
573 users
import collections lst = [1, 1, 2, 3, 4, 4, 4, 5, 6, 6, 7, 7, 7, 7] count_elements = {i:lst.count(i) for i in lst} for key, value in count_elements.items(): if (value > 1): print(key, " : ", value) ''' run: 1 : 2 4 : 3 6 : 2 7 : 4 '''