Copying 2D lists in python
<p>Hi I want to copy a 2D list, so that if I modify 1 list, the other is not modified.</p>

<p>For 1 D list, I just do this:</p>

<pre><code>a = [1,2]
b = a[:]
</code></pre>

<p>And now if I modify b, a is not modified.</p>

<p>But this doesn't work for 2D list:</p>

<pre><code>a = [[1,2],[3,4]]
b = a[:]
</code></pre>

<p>If I modify b, a gets modified as well.</p>

<p>How do I fix this?</p>
