95. Method Resolution Order (MRO)
class A:
def method(self):
return "Method from A"
class B(A):
pass
b = B()
print(b.method()) # Output: Method from Aclass A:
def method(self):
return "Method from A"
class B(A):
def method(self):
return "Method from B"
b = B()
print(b.method()) # Output: Method from BLast updated