title: Confused with nested list
body: <p>I have created a simple function to map True or False to a nested list 'visited' depending on the value in nested list 'maze'. I tried to analyse it but not able to figure out why the position (1,0) is updating with True even though position (1,0) has no '=' or '|' value. Any help.</p>
  
  <pre><code>def start_matrix(maze):
       visited = [[False]*len(maze[0])]*len(maze)
       print(visited)
       for i in maze:
         for k in i:
            if k == '=' or k == '|':
              print(maze.index(i),i.index(k))
              print(visited[maze.index(i)][i.index(k)])
              visited[maze.index(i)][i.index(k)] = True
              print(visited)
  return None
  </code></pre>
  
  <p>Input</p>
  
  <pre><code>map1 = [['=',' ','|'],[' ',' ',' ']]
  start_matrix(map1)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>[[False, False, False], [False, False, False]]
  0 0
  False
  [[True, False, False], [True, False, False]]
  0 2
  False
  [[True, False, True], [True, False, True]]
  </code></pre>