-7

myArray = [1,0,2,4,5,10,4,0,3,0] How to calculate the number of zeros in the the above array?

Jas Brar
  • 1
  • 4

1 Answers1

0
from collections import Counter
myArray = [1,0,2,4,5,10,4,0,3,0]

#Display the count of each value in the array
print(Counter(myArray))
Reez0
  • 2,512
  • 2
  • 17
  • 39