title: Python 2D Array Issue
body: <p>I am trying to set a specific value of a 2D array to True. Here is the snippet of code:</p>
  
  <pre><code>b [ [False] * 3] * 3
  b[2][1] = True 
  </code></pre>
  
  <p>Unfortunately, this is setting the entire row to True (so <code>b[0][1]</code> would then be changed to True). Any ideas on what is going on?</p>
  
  <p>EDIT:</p>
  
  <p>Just tried this code and it worked:</p>
  
  <pre><code> b = []
   for i in range(3):
       b.append([False, False, False])
   b[1][2] = True
  </code></pre>
  
  <p>Why would it work in that case and not the former?</p>