Examveda
Examveda

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

A. To create new instances of a class

B. To call the base class constructor

C. To create subclass methods

D. To override base class methods

Answer: Option B

Solution(By Examveda Team)

The super() function is used to call the constructor of the base class in a subclass.

This Question Belongs to Python Program >> Advanced OOP Concepts

Join The Discussion

Related Questions on Advanced OOP Concepts

What is inheritance in OOP?

A. Creating new objects from existing ones

B. Allowing objects to share attributes and methods

C. Restricting access to object attributes

D. Converting classes into objects