ShriRam Changed status to publish August 21, 2023
class Parent: # define parent class
def myMethod(self):
print (‘Calling parent method’)
class Child(Parent): # define child class
def myMethod(self):
print (‘Calling child method’)
c = Child() # instance of child
c.myMethod() # child calls overridden method
ShriRam Changed status to publish August 21, 2023