Python __repr__() Magic Method
Syntax object.__repr__(self) The Python __repr__ method returns a string representation of the object on which it is called. It implements the built-in repr() function. If you call print(x) an object x, Python internally calls x.__str__() to determine the string representation of object x. If this isn’t implemented, Python calls x.__repr__(). We call this a “Dunder … Read more