Answers for "calculate the frequency of occurrence of each character/integer in that list(count"

0

python count the frequency of words in a list

from collections import Counter
list1=['apple','egg','apple','banana','egg','apple']
counts = Counter(list1)

print(counts)
# Counter({'apple': 3, 'egg': 2, 'banana': 1})
Posted by: Guest on February-25-2021

Code answers related to "calculate the frequency of occurrence of each character/integer in that list(count"

Python Answers by Framework

Browse Popular Code Answers by Language