Question OOP-INH-0044
MediumWhat is the output of this code?
class A:
def who(self): return "A"
class B(A):
def who(self): return "B"
class C(A):
def who(self): return "C"
class D(B, C):
pass
print(D().who(), [k.__name__ for k in D.__mro__][1:3])
- A.
C ['C', 'B']
- B.
A ['A', 'B']
- C.
Sign up free to see the answer and a step-by-step explanation.