title: Get length of list in Python using recursion
body: <p>I am trying to calculate the length of a list. When I run it on cmd, I get:</p>
  
  <pre>
  RuntimeError: maximum recursion depth exceeded in comparison
  </pre>
  
  <p>I don't think there's anything wrong with my code:</p>
  
  <pre><code>def len_recursive(list):
      if list == []:
          return 0
      else:
          return 1 + len_recursive(list[1:])
  </code></pre>