how to count how many times a word appears in a list in python code example
Example 1: how to find the number of times a number appears in python
dict((i, a.count(i)) for i in a)
Example 2: count values in list usiing counter
from collections import Counter