title: Python Reference Appending List
body: <p>Im a bit baffled how this works.  </p>
  
  <pre><code>x = []
  y = []
  for i in range(5):
      y.append(i) # Why does this create full copies of sub lists?
      x.append(y)
      #x.extend(y) # This works normal
  
  print x
  </code></pre>
  
  <p>Why is <code>x.append(y)</code> cauusing the final result to be the following? Could you please explain if there is some background reference values going on?</p>
  
  <pre><code>[[0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]
  </code></pre>