Anzahl der Vorkommen aller Elemente in List 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")