unnested
Learn
Practice
Pro
Sign in
Classes
1 / 5
EASY
·
Multiple choice
What is the difference between __repr__ and __str__?
__repr__ is for developers (unambiguous, ideally eval-able); __str__ is for end users (readable display)
__repr__ is called by print(); __str__ is called in the REPL
__str__ is for developers; __repr__ is for end users
They are identical - define either one and the other works automatically
Sign in
to save your progress.