Vidyalelo
Python · Q7

Advanced OOP Concepts

Programming · Python · question 7

Q7

How is the super() function used in Python inheritance?

A.
To create new instances of a class
B.
To call the base class constructor
Answer
C.
To create subclass methods
D.
To override base class methods

Answer: Option B

Solution

Answer: Option B
Solution:
The super() function is used to call the constructor of the base class in a subclass.