title: What is the difference between the following 2 methods?
body: <p>While working on a project I've come across the following two list forms:</p>
  
  <p>1)</p>
  
  <pre><code>l1=[10]*2
  p1,p2=l1
  </code></pre>
  
  <p>2)</p>
  
  <pre><code>l2=[]
  for i in xrange(2):
     l2.append(10)
  p1,p2=l2
  </code></pre>
  
  <p>Both appear to have the same output (as in <code>l1=l2</code>) but when I print some graphs they are not the same, so there must be something. Any help or suggestion is greatly appreciated. The above code is a minimal working example.</p>