title: Python counting zeros
body: <p>I have created a code which basically generates a random 20 digit number. Code below:</p>
  
  <pre><code>import random
  from random import randint
  
  n=20
  
  def digit(n):
  
      range_start = 10**(n-1)
      range_end = (10**n)-1
      return randint(range_start, range_end+1)
  
  
  print(digit(n))
  </code></pre>
  
  <p>The output of this code for example is:</p>
  
  <pre><code>49690101904335902069
  </code></pre>
  
  <p>Now given this code I'm just wondering how I can go about to counting the number of zeros in the output, so essentially I'm trying to create a new function called <code>count_zero():</code>, but I have no idea what to put it for my parameter and what not.</p>