Python Programming - Inheritance - Discussion

Discussion Forum : Inheritance - General Questions (Q.No. 10)
10.
In Python, what is the purpose of the super(type, obj) function?
To call the superclass constructor
To create a new instance of the subclass
To access class attributes directly
To explicitly specify the superclass
Answer: Option
Explanation:
The super(type, obj) function is used to call the constructor of the superclass, providing a way to initialize the superclass when working with multiple inheritance.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.