Python Programming - Inheritance - Discussion

Discussion Forum : Inheritance - General Questions (Q.No. 5)
5.
In Python, what is the order in which classes are searched when resolving a method or attribute?
Bottom-up: From subclass to superclass
Top-down: From superclass to subclass
Random: No specific order
Alphabetical: Based on class names
Answer: Option
Explanation:
In Python, the method resolution order (MRO) follows a top-down approach, searching for methods or attributes first in the current class, then in its superclass, and so on.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.