What is the output of the following code:
class Parent:
x = 10
class Child(Parent):
pass
obj = Child()
print(obj.x)
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

Join The Discussion