title: How do I change column of a 2d list in Python?
body: <p>I am creating a program that needs to change all of a certain column's values to 1. Originally I thought that <code>n[:][0] = 1</code> would have been sufficient, but it doesn't work.</p>
  
  <pre><code>n = [[0] * 3 for _ in range(3)]
  print(n) #output: [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
  
  [...] #change all of column 0 of 2d list "n" to 1
  print(n) #output: [[1, 0, 0], [1, 0, 0], [1, 0, 0]]
  </code></pre>