Same Method, Different super() Target
class A:
def greet(self):
return "A"
class B(A):
def greet(self):
return "B->" + super().greet()
class C(A):
def greet(self):
return "C->" + super().greet()
class D(B, C):
def greet(self):
return "D->" + super().greet()
print(B().greet())
print(D().greet())
What do the two print calls output, in order?
Sign in to answer questions and track your progress
Sign In