title: constructing a list of lists in python 3.0 inside a class
body: <p>This is my code:</p>
  
  <pre><code>class Matrix:
      def  __init__(self,L1):
          L=[]
          for i in L1:
              self.L.append(i)
  m = Matrix([[1, 2], [13, 4], [5, 6]])
  
  print(m) 
  </code></pre>
  
  <p>always get the following error, I don't know how to fix it:</p>
  
  <pre><code>&lt;ipython-input-40-bb793667b807&gt; in __init__(self, L1)
        3         L=[]
        4         for i in L1:
  ----&gt; 5             self.L.append(i)
  AttributeError: 'Matrix' object has no attribute 'L'
  </code></pre>