Vidyalelo
Python · Q25

Advanced OOP Concepts

Programming · Python · question 25

Q25

What is the purpose of the super() function in advanced OOP?

A.
To call the base class constructor
Answer
B.
To create a new instance of a class
C.
To override base class methods
D.
To define class attributes

Answer: Option A

Solution

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