← Quiz: Python OOP: all 15 questions
Quiz: Python OOP · Question 5 of 15
Which method controls what print(obj) shows?
Which method controls what print(obj) shows?
- A.init
- B.str
- C.print
- D.show
Answer & explanation
Correct answer: str
print() calls the object's str method.
Can you get the rest right without peeking?
Take the timed Quiz: Python OOP quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →