python calculate element times in a list code example
Example 1: count occurrences of value in array python
>>> l = ["a","b","b"]
>>> l.count("a")
Example 2: count values in list usiing counter
from collections import Counter
>>> l = ["a","b","b"]
>>> l.count("a")
from collections import Counter