title: Python - Create constant array of unique elements
body: <p>I recently tried to instantiate a 4x4 constant (0's) array by using</p>
  
  <pre><code>a = [[0] * 4] * 4
  </code></pre>
  
  <p>which instantiates the array <code>a</code> as</p>
  
  <pre><code>[[0, 0, 0, 0], 
   [0, 0, 0, 0], 
   [0, 0, 0, 0], 
   [0, 0, 0, 0]]
  </code></pre>
  
  <p>However, this does not create an array of unique elements as altering an element in any of the arrays changes all of them, e.g.:</p>
  
  <pre><code>a[0][0] = 1
  </code></pre>
  
  <p>alters <code>a</code> to </p>
  
  <pre><code>[[1, 0, 0, 0], 
   [1, 0, 0, 0], 
   [1, 0, 0, 0], 
   [1, 0, 0, 0]]
  </code></pre>
  
  <p>I think I understand why this happens (copies of lists copy the list's pointer and do not create separate copies unless specified, unlike int's, etc.) but am left wondering: </p>
  
  <p><strong>Is there any quick and easy way to instantiate a constant array (without using any external modules, such as NumPy) with unique elements that can later be altered by simple <code>a[i][j] = x</code> addressing?</strong></p>