标签: python
myArray = [1,0,2,4,5,10,4,0,3,0] 如何计算上述数组中的零个数?
答案 0 :(得分: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))