Examveda

What is the output of the following code:
class Parent:
x = 10
class Child(Parent):
pass
obj = Child()
print(obj.x)

A. 10

B. An error will occur

C. obj

D. Child

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