title: Counting down and then up
body: <p>I'm new to python and trying to run a function that will, given one variable, count down to zero and then up to the original variable. the output should look something like this:</p>
  
  <pre><code>&gt;&gt;&gt; functionname(5)
  5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5
  </code></pre>
  
  <p>so far I've written the code below, but this doesn't count up all the way to the original variable. I guess I need to somehow save the variable in order to refer to it later, but I have no idea how to do that, since python automatically changes <code>n</code> as the function goes on.</p>
  
  <pre><code>def functionname(n):
      n = orginal
      while n &gt; 0:
          print n
          n=n-1
      print n
      if n==0:
          print n
          n=n+1
  </code></pre>
  
  <p>I would be very grateful for some pointers, as I seem to be completely stuck at the moment.</p>