title: Multiple assignment and evaluation order in Python
body: <p>What is the difference between the following Python expressions:</p>
  
  <pre><code># First:
  
  x,y = y,x+y
  
  # Second:
  
  x = y
  y = x+y
  </code></pre>
  
  <p><em>First</em> gives different results than <em>Second</em>.</p>
  
  <p>e.g.,</p>
  
  <p><em>First:</em></p>
  
  <pre><code>&gt;&gt;&gt; x = 1
  &gt;&gt;&gt; y = 2
  &gt;&gt;&gt; x,y = y,x+y
  &gt;&gt;&gt; x
  2
  &gt;&gt;&gt; y
  3
  </code></pre>
  
  <p><em>Second:</em></p>
  
  <pre><code>&gt;&gt;&gt; x = 1
  &gt;&gt;&gt; y = 2
  &gt;&gt;&gt; x = y
  &gt;&gt;&gt; y = x+y
  &gt;&gt;&gt; x
  2
  &gt;&gt;&gt; y
  4
  </code></pre>
  
  <p><em>y</em> is 3 in <em>First</em> and 4 in <em>Second</em></p>