title: List copy not working?
body: <p>I got something with Python that I can't understand. 
  I have a list of lists, called data:</p>
  
  <pre><code>data = [[75], [95, 64], [17, 47, 82], [18, 35, 87, 10], [20, 4, 82, 47, 65], [19, 1, 23, 75, 3, 34], [88, 2, 77, 73, 7, 63, 67], [99, 65, 4, 28, 6, 16, 70, 92], [41, 41, 26, 56, 83, 40, 80, 70, 33], [41, 48, 72, 33, 47, 32, 37, 16, 94, 29], [53, 71, 44, 65, 25, 43, 91, 52, 97, 51, 14], [70, 11, 33, 28, 77, 73, 17, 78, 39, 68, 17, 57], [91, 71, 52, 38, 17, 14, 91, 43, 58, 50, 27, 29, 48], [63, 66, 4, 68, 89, 53, 67, 30, 73, 16, 69, 87, 40, 31], [4, 62, 98, 27, 23, 9, 70, 98, 73, 93, 38, 53, 60, 4, 23]]
  </code></pre>
  
  <p>I want to create a copy of data, whose data would be reversed (1 becomes 99 and so on).</p>
  
  <p>I then have the sorted_values and the reverse ones: </p>
  
  <pre><code>sorted_vals = [1, 2, 3, 4, 6, 7, 9, 10, 11, 14, 16, 17, 18, 19, 20, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 43, 44, 47, 48, 50, 51, 52, 53, 56, 57, 58, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 75, 77, 78, 80, 82, 83, 87, 88, 89, 91, 92, 93, 94, 95, 97, 98, 99]
  reverse_vals = [99, 98, 97, 95, 94, 93, 92, 91, 89, 88, 87, 83, 82, 80, 78, 77, 75, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 60, 58, 57, 56, 53, 52, 51, 50, 48, 47, 44, 43, 41, 40, 39, 38, 37, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 23, 20, 19, 18, 17, 16, 14, 11, 10, 9, 7, 6, 4, 3, 2, 1]
  </code></pre>
  
  <p>I create a copy of data:</p>
  
  <pre><code>rev_data = data[:] 
  </code></pre>
  
  <p>Then, I change data while running through my list:</p>
  
  <pre><code>for index, item in enumerate(rev_data):
      for s_index, s_item in enumerate(item):
          rev_data[index][s_index] = reverse_val[sort_val.index(s_item)]
  </code></pre>
  
  <p>My problem is that whatever my method to create rev_data, data is also modified during the process! </p>
  
  <p>I tried:</p>
  
  <pre><code>rev_data = list(data)
  rev_data = data[:]
  
  rev_data = []
  rev_data.extend(data)
  </code></pre>
  
  <p>Each time, the final answer is correct, but data is also changed . . . </p>
  
  <pre><code>data = [[25], [4, 35], [83, 52, 18], [82, 64, 16, 91], [78, 95, 18, 52, 34], [80, 99, 77, 25, 97, 65], [14, 98, 23, 26, 93, 37, 32], [1, 34, 95, 71, 94, 87, 29, 9], [57, 57, 73, 43, 17, 58, 19, 29, 66], [57, 51, 27, 66, 52, 67, 63, 87, 6, 70], [44, 28, 53, 34, 75, 56, 10, 47, 3, 48, 88], [29, 89, 66, 71, 23, 26, 83, 20, 60, 31, 83, 41], [10, 28, 47, 62, 83, 88, 10, 56, 40, 50, 72, 70, 51], [37, 33, 95, 31, 11, 44, 32, 69, 26, 87, 30, 16, 58, 68], [95, 38, 2, 72, 77, 92, 29, 2, 26, 7, 62, 44, 39, 95, 77]]
  </code></pre>