The purpose of __str__() is to return a string that is human readable and can be printed.
The purpose of __repr__() is to return a string that is a valid Python expression i.e. if eval()-ed it wont return an error.
The purpose of __str__() is to return a string that is human readable and can be printed.
The purpose of __repr__() is to return a string that is a valid Python expression i.e. if eval()-ed it wont return an error.