title: How to count recursion depth without passing a count argument in Python?
body: <p>Write a function, persistence, that takes in a positive parameter <code>n</code> and returns its multiplicative persistence, which is the number of times you must multiply the digits in <code>n</code> until you reach a single digit.</p>
  
  <p>For example:</p>
  
  <p>I have tried this code which works but the game's rule is that I cannot pass 2 arguments. So I have to eliminate the <code>counter</code> argument.</p>
  
  <pre class="lang-py prettyprint-override"><code>def persistence(n,counter): #recursion
  
      n = list(str(n))
      product = 1
  
      for i in n:
          product *= int(i)
  
      if product &lt; 10:
          return counter+1
  
      else:
          counter +=1
          return persistence(product,counter)
  </code></pre>
  
  <pre class="lang-py prettyprint-override"><code>persistence(39) # returns 3, because 3*9=27, 2*7=14, 1*4=4
                   # and 4 has only one digit
  </code></pre>