title: Python: Changing values of a nested list
body: <p>So I'm using a nested list to store some data and I'm having trouble with changing specific values of one of the sublists:</p>
  
  <pre><code>if attributes[3] == 'W':
      self.board[3][3] = 'W'
  </code></pre>
  
  <p>(numbers are placeholders i'm using to test)</p>
  
  <p>board is a class variable that is created as follows (I'm trying to create a grid as specified by a user, with their input for column and row sizes making up the first two parts of attributes)</p>
  
  <pre><code>self.board = []
  rows = []
  self.score = [0, 0]
  for x in range(attributes[0]):
      rows.append('')
  for y in range(attributes[1]):
      self.board.append(rows)
  </code></pre>
  
  <p>However, whenever I try to change the value of a sublist, it changes the values for all sublists for that same index:</p>
  
  <pre><code>[['', '', '', 'W', '', '', '', ''], ['', '', '', 'W', '', '', '', ''], ['', '', '', 'W', '', '', '', ''], ['', '', '', 'W', '', '', '', ''], ['', '', '', 'W', '', '', '', ''], ['', '', '', 'W', '', '', '', ''], ['', '', '', 'W', '', '', '', ''], ['', '', '', 'W', '', '', '', '']]
  </code></pre>
  
  <p>I can't figure out what's wrong. Anyone have any ideas?</p>