title: Recursion - Python, return value question
body: <p>I realize that this may sound like a silly question, but the last time I programmed it was in assembler so my thinking may be off:</p>
  
  <p>A recursive function as so:</p>
  
  <pre><code>def fac(n):
      if n == 0:
          return 1
      else:
          return n * fac(n - 1)
  </code></pre>
  
  <p>Why is it that when the function reaches n == 0 that it does not return 1 but rather the answer which is the factorial. I am thinking something like in assembler it would be when n == 0: </p>
  
  <pre><code>mov eax, 1
  ret
  </code></pre>
  
  <p>Why does the code above work, I suppose python returns the last value on the stack before that condition ?</p>