Question 14/17
intermediate
Select one answer

What is the difference between __str__ and __repr__?

They are the same
__str__ is for users (readable), __repr__ is for developers (unambiguous)
__repr__ is deprecated
__str__ is called by repr(), __repr__ by str()

Premium Question

Upgrade to unlock this question and 300+ more interview prep MCQs.