title: How to make a completely unshared copy of a complicated list? (Deep copy is not enough)
body: <p>Have a look at this Python code:</p>
  
  <pre><code>a = [1, 2, 3]
  b = [4, 5, 6]
  c = [[a, b], [b, a]] # [[[1, 2, 3], [4, 5, 6]], [[4, 5, 6], [1, 2, 3]]]
  c[0][0].append(99)   # [[[1, 2, 3, 99], [4, 5, 6]], [[4, 5, 6], [1, 2, 3, 99]]]
  </code></pre>
  
  <p>Notice how modifying one element of <code>c</code> modifies that everywhere. That is, if <code>99</code> is appended to <code>c[0][0]</code>, it is also appended to <code>c[1][1]</code>. I am guessing this is because Python is cleverly <em>referring</em> to the <em>same object</em> for <code>c[0][0]</code> and <code>c[1][1]</code>. (That is their <em>id()</em> is the same.)</p>
  
  <p><strong>Question:</strong> Is there something that can be done to <code>c</code> so that its list elements can be safely locally modified? Above is just an example, my real problem has a list much more complicated, but having a similar problem.</p>
  
  <p>(Sorry for the poorly formed question above. Python gurus please feel free to modify the question or tags to better express this query.)</p>