title: How to iterate over a list that has duplicate values?
body: <p>This is probably a very basic question but I dont know what I have to search for to find the answer for it:</p>
  
  <p>I have this code:</p>
  
  <pre><code>list = [[0,1],[0,2],[1,3],[1,4],[1,5]]
  
  list.append(list[0])
  
  for i in list:
      i.append(0)
  
  print(list)
  </code></pre>
  
  <p>This List will later be used as coordinates for a curve. I need to duplicate the first coordinate at the end to get a closed curve. </p>
  
  <p>If I then want to add a third value to each coordinate in the list the first and last item in list will be iterated over twice:</p>
  
  <pre><code>[[0, 1, 0, 0], [0, 2, 0], [1, 3, 0], [1, 4, 0], [1, 5, 0], [0, 1, 0, 0]]
  </code></pre>
  
  <p>I am guessing they have the same memory address and thereby the append-function is applied to the same object at this address once for the first index and once for the last. </p>
  
  <p>What is this phenomenon called ? what is the easiest way to get the list like this: </p>
  
  <pre><code>[[0, 1, 0], [0, 2, 0], [1, 3, 0], [1, 4, 0], [1, 5, 0], [0, 1, 0]]
  </code></pre>
  
  <p>Thank you for your help</p>