create 2d array in python?
<p>this is the code i am trying to create the 2d matrix</p>

<pre><code>m=4
tagProb=[[]]*(m+1)
count=0
index=0
for line in lines:
    print(line)
    if(count &lt; m+1):
       tagProb[index].append(line.split('@@')[2].strip()) 
       count+=1
    if(count == m+1): // this check to goto next index
        count = 0
        index+=1
print(tagProb)  
</code></pre>

<p>i get the o/p</p>

<pre><code>[['0.0', '0.6', '0.05', '0.3', '0.05', '0.1', '0.0', '0.6', '0.0', '0.0', '0.1', '0.0', '0.0', '0.9', '0.0', '0.1', '0.0', '0.2', '0.7', '0.0', '0.1', '0.0', '0.9', '0.0', 0.0'], ['0.0', '0.6', '0.05', '0.3', '0.05', '0.1', '0.0', '0.6', '0.0', '0.0', '0.1', '0.0', .0', '0.9', '0.0', '0.1', '0.0', '0.2', '0.7', '0.0', '0.1', '0.0', '0.9', '0.0', '0.0'], '0.0', '0.6', '0.05', '0.3', '0.05', '0.1', '0.0', '0.6', '0.0', '0.0', '0.1', '0.0', '0.0','0.9', '0.0', '0.1', '0.0', '0.2', '0.7', '0.0', '0.1', '0.0', '0.9', '0.0', '0.0'] ]
</code></pre>

<p>all the values are appended and list has same values.
How can i avoid this ?</p>
