title: Python two-dimensional array - changing an element
body: <p>I have this 7x7 two-dimensional array:</p>
  
  <pre><code>l=[[1, 1, 1, 1, 1, 1, 1],
    [1, 0, 2, 0, 0, 0, 1],
    [1, 0, 0, 0, 0, 0, 1],
    [1, 0, 0, 0, 0, 0, 1],
    [1, 0, 0, 0, 0, 0, 1],
    [1, 0, 0, 0, 0, 0, 1],
    [1, 1, 1, 1, 1, 1, 1]]
  </code></pre>
  
  <p>As you can see, l[1][2]=2. When I print it, the element is printed correctly. No problem here. But when I try to change it from "2" to "3" or any other number, the program changes all the elements on that column (in this case the 3rd column) except for the first and last ones. For example, if I type this code:</p>
  
  <pre><code>l[1][2]=5
  </code></pre>
  
  <p>and then print the two-dimensional array, I get this:</p>
  
  <pre><code>l=[[1, 1, 1, 1, 1, 1, 1],
    [1, 0, 5, 0, 0, 0, 1],
    [1, 0, 5, 0, 0, 0, 1],
    [1, 0, 5, 0, 0, 0, 1],
    [1, 0, 5, 0, 0, 0, 1],
    [1, 0, 5, 0, 0, 0, 1],
    [1, 1, 1, 1, 1, 1, 1]]
  </code></pre>
  
  <p>This happens with every element that I choose. Instead of changing only that element, it changes the entire column. 
  Does anyone know what might be the problem? Thank you! </p>