Python - Inheritance and Code Reuse
What will be the output of this code?
class A:
def show(self):
print('A show')
class B(A):
def show(self):
super().show()
print('B show')
obj = B()
obj.show()What will be the output of this code?
class A:
def show(self):
print('A show')
class B(A):
def show(self):
super().show()
print('B show')
obj = B()
obj.show()15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions