title: __str__ from my own matrix, python
body: <p>I'm making my own matrix module (I know that numpy exists) and I'm not quite sure how to build my <code>__str__</code>. My matrix looks like this</p>
  
  <pre><code>for _ in range(rows):
          self.matrixRC.append([2 for _ in range(colls)])
  </code></pre>
  
  <p>here I'm filling my matrix with the <code>int</code> 2. If we just say that <code>rows = 5</code> and <code>calls = 3</code> than i get this when i print it</p>
  
  <pre><code>[[2, 2, 2],[2, 2, 2],[2, 2, 2],[2, 2, 2],[2, 2, 2]]
  </code></pre>
  
  <p>but i want to get</p>
  
  <pre><code>222
  222
  222
  222
  222
  </code></pre>
  
  <p>does anyone know a simple 'Python' way to do this</p>
  
  <p>This is literally the only part int the <code>__init__</code></p>
  
  <pre><code>def __init__(self, rows = 10, colls = 10):
      self.matrixRC = []
      for _ in range(rows):
          self.matrixRC.append([2 for _ in range(colls)])
  </code></pre>
  
  <p>and for the <code>rows colls</code> thing... that was just weird thinking, I'm still having trouble thinking of this arbitrary matrix. But now the <code>rows and colls</code> should be done right. If it is easyer to make the <code>__init__</code> like this</p>
  
  <pre><code>def __init__(self, rows = 10, colls = 10):
      self.matrixRC = []
      for _ in range(colls):
          self.matrixRC.append([2 for _ in range(rows)])
  </code></pre>
  
  <p>than that's perfectly fine too</p>