Method overriding-
-python method overriding occurs by simply defining in the child class a method with the same name of a method in the parent class.
-Function name is same in parent and child class.
program-
#create parent class A
class A():
def function(self):
print("Function of class A")
#create child class B
class B(A):
def function(self):
print("Function of class B")
b=B()
b.function()
Function of class B