Answers for "find occerences in list python"

0

find occerences in list python

a_list = ["a", "b", "a"]
occurrences = collections. Counter(a_list)
print(occurrences)
print(occurrences["a"])
Posted by: Guest on February-06-2022

Python Answers by Framework

Browse Popular Code Answers by Language