title: Understanding *x ,= lst
body: <p>I'm going through some old code trying to understand what it does, and I came across this odd statement:</p>
  
  <pre><code>*x ,= p
  </code></pre>
  
  <p><code>p</code> is a list in this context. I've been trying to figure out what this statement does. As far as I can tell, it just sets <code>x</code> to the value of <code>p</code>. For example:</p>
  
  <pre><code>p = [1,2]
  *x ,= p    
  print(x)
  </code></pre>
  
  <p>Just gives</p>
  
  <pre><code>[1, 2]
  </code></pre>
  
  <p>So is this any different than <code>x = p</code>? Any idea what this syntax is doing?</p>