Examveda

What is the output of the following code:
class Parent:
def init(self):
print('Parent constructor')
class Child(Parent):
def init(self):
print('Child constructor')
obj = Child()

A. Child constructor

B. Parent constructor

C. An error will occur

D. Child Parent

Answer: Option A


This Question Belongs to Python Program >> Classes And Objects In Python

Join The Discussion

Related Questions on Classes and Objects in Python