2D Array Unintended Assignment Bug
<p>I want to create a 2D array, like so:</p>

<pre><code>grid[y][x] 
</code></pre>

<p>So that there are y amount of rows and x amount of columns.</p>

<p>Below is the way I did it, but I when I tried to assign the (0,0) of the array to contain the value '2', the code assigned the first value of each subarray to '2'. </p>

<p>Why is this happening? How should I pythonically instantiate a 2D array?       </p>

<pre><code>n = 4 
x=0 
y=0 
grid = [[None]*n]*n 

print grid 

grid[y][x]='Here' 

print grid
</code></pre>
