class A:
def test(self):
print("test of A is called")
class B(A):
def test(self):
print("test of B is called")
super().test()
class C(A):
def test(self):
print("test of C is called")
super().test()
class D(B, C):
def test3(self):
print("test of D is called")
p = D()
p.test()
Options:
Explanation
Correct answer is : D
As in B , test() method is called using super() i.e. super().test() , then it call all the test() method of class D in MRO
so it will be invoked as B -> C -> A.
Remember super() does not invoke super class of B , but of D
Comment here: