title: Does a slicing operation give me a deep or shallow copy?
body: <p>The <a href="http://docs.python.org/2/library/copy.html" rel="noreferrer">official Python docs</a> say that using the slicing operator and assigning in Python makes a shallow copy of the sliced list.</p>
  
  <p>But when I write code for example:</p>
  
  <pre><code>o = [1, 2, 4, 5]
  p = o[:]
  </code></pre>
  
  <p>And when I write: </p>
  
  <pre><code>id(o)
  id(p)
  </code></pre>
  
  <p>I get different id's and also appending one one list does not reflect in the other list. Isn't it creating a deep copy or is there somewhere I am going wrong?</p>