title: How to print 2d array of objects in python?
body: <p>I have a 2d array of objects, where I've assigned each index an object:</p>
  
  <pre><code>for row in range(0, 9):
          for column in range(0, 9):
              self.Matrix[row][column] = Square(row, column) 
  </code></pre>
  
  <p>where Square() is an object that takes in a specific index. Each Square object has a method constructor (<code>def __str__</code>) that will print a specific text(ex. "KN") for its specific coordinates. I've tried just printing the matrix:</p>
  
  <pre><code>print self.Matrix()
  </code></pre>
  
  <p>but I end up getting a really long that's something like</p>
  
  <pre><code>[[&lt;__main__.Square object at 0x101936d90&gt;, &lt;__main__.Square object at 0x101936dd0&gt;, &lt;__main__.Square object at 0x101936e10&gt;, .....
  </code></pre>
  
  <p>How can I print the actual objects instead?</p>