title: how to make a variable immutable in python
body: <p>My python script:</p>
  
  <pre><code>N = 2  # 2*2 matrix
  
  a = N * [0]
  b = a
  
  print(b)  # prints [0, 0]
  
  for i in range(N):
      a[i] = N * [0]
  
  for i in range(N):
      for j in range(N):
          a[i][j] = 0
  
  print(a)  # prints [[0, 0], [0, 0]]
  
  print(b)  # prints [[0, 0], [0, 0]]
  </code></pre>
  
  <p>Why does my second <code>print(b)</code> change? How to make it immutable? I'd like my <code>b</code> to still contain <code>[0, 0]</code>.</p>