File size: 194 Bytes
6c62356
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import math
from array import array
def zero_count(nums):
    n = len(nums)
    n1 = 0
    for x in nums:
        if x == 0:
            n1 += 1
        else:
          None
    return n1/(n-n1)