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)
student_grades = [9.1, 8.8, 10.0, 7.7, 6.8, 8.0, 10.0, 8.1, 10.0, 9.9]
samebnumber = student_grades.count(10.0)
print(samebnumber)
indices = [index for index, element in enumerate(a_list) if element == 1]