a_list = ["a", "b", "a"] occurrences = collections. Counter(a_list) print(occurrences) print(occurrences["a"])