count number of instances in array python code example
Example 1: python how to count items in array
myArray = [1, 2, 3]
len(myArray)
#output
3
Example 2: count values in list usiing counter
from collections import Counter
myArray = [1, 2, 3]
len(myArray)
#output
3
from collections import Counter