The Super Function

What is the super() function?

The use of super() comes into play when we implement inheritance. It is used in a child class to refer to the parent class without explicitly naming it. It makes the code more manageable, and there is no need to know the name of the parent class to access its attributes.

Note: Make sure to add parenthesis at the end to avoid a compilation error.

Get hands-on with 1200+ tech skills courses.