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