Abnormal list behaviour
<p>I was working on some problem and came across this.</p>

<p>Python code</p>

<pre><code>row=[]
col=[]
init=[-1,-1]
</code></pre>

<p>Now I append this <code>init</code> to <code>row</code> and <code>col</code>.</p>

<pre><code>row.append(init)
row.append(init)

col.append(init)
col.append(init)
</code></pre>

<p>Therefore <code>row = [[-1,-1],[-1,-1]]</code> and <code>col = [[-1,-1],[-1,-1]]</code></p>

<p>Now when i change <code>init[0] = 9</code> my <code>row</code> and <code>col</code> becomes
<code>row = [[9,-1],[9,-1]]</code> and <code>col = [[9,-1],[9,-1]]</code></p>
