Python Developer — Hard
Key points
- __str__ for user-facing output, __repr__ for developer representation
- __repr__ serves both purposes if __str__ is not defined
- __str__ used by print() and str() functions
Ready to go further?
Related questions
Python Developer — Hard
Key points
Ready to go further?
Related questions