title: Recursively finding the same numbers in a list
body: <p>I've been wanting to practice my python and so I want to be able to locate the number 3 using recursion but the code itself continues to run past the number of elements in the list. I had used a while loop but that hadn't work and neither does a generic if statement</p>
  <pre><code>listofnum = [7,6,21,12,3,99,8,3,0]
  def recursion(x,counter):
  if counter &gt;= 0:
      if x[0] == 3:
          print(&quot;here&quot;)
          recursion(x[1:],len(x)-1)
      else:
          print(&quot;next item...&quot;)
          recursion(x[1:],len(x)-1)
  else:
      return &quot;Done&quot;
  </code></pre>
  <p>It does find 3 both times, but the code is in an endless loop</p>