there are actually two dunder methods that control how objects are converted to strings in Python 3.
__str__ is one of Python’s “dunder” (double-underscore) methods and gets called when you try to convert an object into a string
Inspecting an object in a Python inter-
preter session simply prints the result of the object’s __repr__ .
Why Every Class Needs a __repr__
If you don’t add a str method, Python falls back on the result
of __repr__ when looking for __str__ .
Post #65
276
