title: What is the difference between LIST.append(1) and LIST = LIST + [1] (Python)
body: <p>When I execute (I'm using the interactive shell) these statements I get this:</p>
  
  <pre><code>L=[1,2,3]
  K=L
  
  L.append(4)
  
  L
  [1,2,3,4]
  K
  [1,2,3,4]
  </code></pre>
  
  <p>But when I do exactly the same thing replacing L.append(4) with L=L+[4]
  I get:</p>
  
  <pre><code>L
  [1,2,3,4]
  K
  [1,2,3]
  </code></pre>
  
  <p>Is this some sort of reference thing? Why does this happen?</p>
  
  <p>Another funny thing I noticed is that L+=[4] acts like .append, which is odd as I thought it would act like L = L + [4].</p>
  
  <p>Clarification to all of this would be greatly appreciated.</p>
  
  <p>Thanks</p>