Go Career
Explore
Pricing
Resources
Login
Get Started
Interview Prep
Back to Python
Intermediate
17 questions
Questions
1
Question 1
2
Question 2
3
Question 3
4
Question 4
5
Question 5
6
Question 6
7
Question 7
8
Question 8
9
Question 9
10
Question 10
11
Question 11
12
Question 12
13
Question 13
14
Question 14
15
Question 15
16
Question 16
17
Question 17
Toggle Sidebar
Back to Intermediate
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.
Upgrade Now
Previous
Back to Intermediate
Next