Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

count number of zeros in a number python

# credit to Stack Overflow user in source link

>>> def count_zeros(number):
...     return str(number).count('0')
... 
>>> count_zeros(49690101904335902069)
5
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #count #number #zeros #number #python
ADD COMMENT
Topic
Name
5+4 =