title: Python class that works as list of lists
body: <p>I'm trying to create a python class that can work as a list of lists. However, all I've managed to develop so far is,</p>
  
  <pre><code>class MyNestedList(list):
  ...
  </code></pre>
  
  <p>I'm aware that the above code will work as,</p>
  
  <pre><code>my = MyNestedList()
  my[0] = 1
  ...
  </code></pre>
  
  <p>But I want my class to work as,</p>
  
  <pre><code>my[0][0] = 1
  ...
  </code></pre>
  
  <p>Will anyone please guide me further?</p>
  
  <p>EDIT: I want the class to pass as a type for the deap framework, as my individual. I can't pass list of lists as my type as it would break my structure.</p>