image
image
image

Function Overriding in Python

image

When a method is defined in both the base class and the derived class, the method in the child class/derived class will override the parent/base class. In the above example, _init_() method in Rectangle class will override the _init_() in Shape class.