Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

count the element in list

from collections import Counter
 
thelist = [1, 4, 2, 3, 5, 4, 5, 6, 7, 8, 1, 3, 4, 5, 9, 10, 11]
c = Counter(thelist)
print(c.most_common(1))
Source by www.pythonprogramming.in #
 
PREVIOUS NEXT
Tagged: #count #element #list
ADD COMMENT
Topic
Name
5+2 =