__str__ vs __repr__ In Python
Summary: The key goal of __str__ and __repr__ is to return a string representation of a Python object. The way they represent the string object differentiates them. str() & __str()__ return a printable/readable string representation of an object which is focused on the end-user. repr() & __repr()__ return a string representation of an object that is a valid Python object, something you can … Read more