1.

What is the significance of super method? Give on example of the same.

Answer»

super ( ) function is used to call base class methods which have been extended in derived class.

Example :

class GradStudent (Student):

def_ init _(self) :

super (GradStudent, self). _init _( )

self. subject = ” ”

self. working = ” ”

def readGrad (self) :

# Call readStudent method of parent class super (GradStudent, self). 

readStudent ( )



Discussion

No Comment Found