Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python counter get most common

from collections import Counter

list_of_words = ['Cars', 'Cats', 'Flowers', 'Cats', 'Cats', 'Cats']
c = Counter(list_of_words)
c.most_common(1)
print("", c.most_common(1))
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #python #counter #common
ADD COMMENT
Topic
Name
3+5 =