title: Python Fibonacci sequence and sequence unpacking
body: <p>I'm processing the fibonacci sequence by iteration. I expected the following two functions to provide the same results, but they do not.</p>
  
  <p>Example 1 (returns Fibonacci sequence as desired):</p>
  
  <pre><code>def run():
      for x in range(0,20):    
          fib(x)
  
  def fib(n):
      a, b = 0, 1
      for i in range(n):
          a, b = b, a + b
      print a
  
  run() 
  </code></pre>
  
  <p>Example 1 results:</p>
  
  <pre><code>0
  1
  1
  2
  3
  5
  8
  13
  21
  34
  </code></pre>
  
  <p>Example 2 (without sequence unpacking):</p>
  
  <pre><code>def run():
      for x in range(0,20):    
          fib(x)
  
  def fib(n):
      a = 0
      b = 1
      for i in range(n):
          a = b
          b = a + b 
      print a
  
  run() 
  </code></pre>
  
  <p>Example 2 results:</p>
  
  <pre><code>0
  1
  2
  4
  8
  16
  32
  64
  128
  256
  </code></pre>
  
  <p>Specifically, why is... </p>
  
  <pre><code>a, b = b, a + b
  </code></pre>
  
  <p>Different than...</p>
  
  <pre><code>a = b
  b = a + b
  </code></pre>