How can I define and use a repr method?
class Print3D, there are a few key points to make our
__repr__() method useful.
Be sure to pass
self to any class method, including
__repr__(), like this:
Inside we need to define how our object is printed. Whenever the built-in
__repr__() method, and if it’s found, it
return value to the screen! So we just
return what the instructions ask:
"(%d, %d, %d)" % (self.x, self.y, self.z)