title: Memory allocation in python
body: <p>I create a list with three elements named l after that I copy all the content of the list into the list y. But when I print the address of them in the memory I don't understand why this is not the same address. Why y is not a reference of l, and if I want that y will be a reference of l so that they will have the same address. How can I do this ?</p>
  
  <p>This is my code</p>
  
  <pre><code>l = [8,12,3]
  y = l[:]
  
  print l
  print y
  
  print id(l)
  print id(y)
  </code></pre>
  
  <p>Display on the screeen :</p>
  
  <pre><code>[8, 12, 3]
  [8, 12, 3]
  40894592 
  40837072
  </code></pre>