title: Python: Usage of Variables and their difference ("a, b = 0, 1" VS "a = 0", "b = 1")
body: <p>I was looking at the Python Manual and found this snippet for a Fibonacci-Number generator:</p>
  
  <pre><code>def fib(n):    # write Fibonacci series up to n
      a, b = 0, 1
      while b &lt; n:
          print(b, end=' ')
          a, b = b, a+b
      print()
  </code></pre>
  
  <p>The output is dependent on n and returns a valid Fibonacci sequence.</p>
  
  <p>If you remodel this to use the variables "a" and "b" seperately like so:</p>
  
  <pre><code>def fib(n):    # write Fibonacci series up to n
      a = 0
      b = 1
      while b &lt; n:
          print(b, end=' ')
          a = b
          b = a+b
      print()
  </code></pre>
  
  <p>then it will print a number sequence that increments by the power of 2 (e.g. 1, 2, 4, 8, 16 and so on).</p>
  
  <p>So I was wondering why that happens? What is the actual difference between the two uses of variables?</p>