title: Python populating all the elements of a 2D list (or array) when I change only one
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/11219949/python-how-to-append-new-elements-in-a-list-of-list">Python : how to append new elements in a list of list?</a>  </p>
  </blockquote>
  
  
  
  <p>I came up with this very strange (for me) behaviour in Python.</p>
  
  <p>I have an empty 2D list (or array if you prefer), and when I add an element to one of it's columns, all the other columns get the same value added.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>row = [1, 2, 3, 4]
  yChannel = 4*[[]]
  
  sectorPlace = 0
  for sector in yChannel:
      sector.append(row[sectorPlace])
      sectorPlace += 1
  
  print yChannel
  </code></pre>
  
  <p>And the output:</p>
  
  <blockquote>
    <p>[[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]</p>
  </blockquote>