title: Why does this List Comprehension work but not the for loop for creating a grid copy?
body: <p>I am confused why the below works but the following does not?</p>
  <p>Input:</p>
  <pre><code>grid = [[0,1,0],[0,0,1],[1,1,1],[0,0,0]]
  </code></pre>
  <p>Working:</p>
  <pre><code>def foo(grid):
      m = len(grid)
      n = len(grid[0])
      gridCopy = [[grid[row][col] for col in range(n)] for row in range(m)]
      return gridCopy == grid
  </code></pre>
  <p>Does not work:</p>
  <pre><code>def bar(grid):
      m = len(grid)
      n = len(grid[0])
      gridCopy = [[None] * n] * m
      for i in range(m):
          for j in range(n):
              gridCopy[i][j] = grid[i][j]
      return gridCopy == grid
  </code></pre>
  <p>I get the following grid returned from <code>bar()</code>:</p>
  <pre><code>gridCopy = [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]]
  </code></pre>