Question 26
What is the output of the following Python code?
class Parent:
def show(self):
return 'Parent'
class Child(Parent):
def show(self):
return 'Child:' + super().show()$c = Child()
print(c.show())$
c.show() calls Child's show method, which concatenates 'Child:' with super().show() which calls Parent.show() returning 'Parent'. Output: 'Child:Parent'.