количество вхождений всех элементов в списке Python
import collections
a_list = ["a", "b", "a"]
occurrences = collections.Counter(a_list)
print(occurrences)
Important Ibex
import collections
a_list = ["a", "b", "a"]
occurrences = collections.Counter(a_list)
print(occurrences)
>>> l = ["a","b","b"]
>>> l.count("a")