← Quiz: Inheritance: all 10 questions
Quiz: Inheritance · Question 4 of 10
How does Python decide which parent method to use in multiple inheritance?
How does Python decide which parent method to use in multiple inheritance?
- A.Randomly
- B.The last parent listed
- C.The Method Resolution Order (MRO)
- D.It raises an error
Answer & explanation
Correct answer: The Method Resolution Order (MRO)
The MRO searches classes in a defined order (left to right, then up).
Can you get the rest right without peeking?
Take the timed Quiz: Inheritance quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →