Consider the following Python code:
class A:
def __init__(self, x):
self.x = x
class B(A):
def __init__(self, x, y):
super().__init__(x)
self.y = y
What is the relationship between the A and B classes?
Composition
Inheritance
Encapsulation
Polymorphism
This question is part of this quiz :
Python Classes Quiz