title: IndexError: list index out of range for 2D list of objects
body: <p>Here's my code:</p>
  <pre><code>class Grid:
      def __init__(self):
          self.matrix = [[Cell(i, j)] for j in range(5) for i in range(6)]
      
      # Extra stuff
  
      def enter_letter(self, letter):
          if self.current_col == 5:
              return
          
          print(self.matrix[0][1].get_letter()) # Test, this is where it goes wrong.
          # It also goes wrong when I call set_letter() a 2nd time as it goes to matrix[0][1] in the line below:
          self.matrix[self.current_row][self.current_col].set_letter(letter)
          self.current_col += 1
  
      # Extra stuff
  
  class Cell:
      def __init__(self, row, col):
          self.row = row
          self.col = col
      
      # Extra stuff
  </code></pre>
  <p>And the thing is, every time I try to access or call <code>set_letter()</code> on <code>self.matrix[0][1]</code>, it gives me the IndexError: list index out of range. It's completely fine when I try to access matrix[4][0] but anything above a 0 for the y value, throws me an index error. I tried Googling and a lot of the suggestions was to call <code>.append()</code> to each list to make it a 2D list (not sure if I explained that right) so I tried but I found it difficult to apply to a list of objects...</p>
  <p>If I could get any suggestions at all, that would be great :)</p>