You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement __repr__ for any class you implement. This should be second nature. Implement __str__ if you think it would be useful to have a string version which errs on the side of readability.
Implement a better representation of the both dunder methods
__repr__
and__str__
.As summarized on Stack Overflow...
So
__repr__
should output something like this:And
__str__
should output something like this:The text was updated successfully, but these errors were encountered: