title: recursive functions returning tuples python
body: <p>I want to build a RECURSIVE function that takes a natural number n and returns a tuple of numbers starting with 0 and ending before n. So rec_range(5) returns (0,1,2,3,4) and rec_range(1) returns (0, ).</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>def rec_range(n):
  """returns a tuple of numbers starting with 0 and ending before n
  
  natural number -&gt; tuple of numbers"""
     if n = 0:
         return 0
     else:
         return rec_range(0, n)
  </code></pre>
  
  <p>I'm not sure what to do next.  Also, it should be noticed that I could not test this function because there was an invalid syntax error.</p>