{"id":28282,"date":"2022-08-28T15:03:43","date_gmt":"2022-08-28T09:33:43","guid":{"rendered":"https:\/\/python-programs.com\/?p=28282"},"modified":"2022-08-28T15:03:43","modified_gmt":"2022-08-28T09:33:43","slug":"method-overriding-in-python","status":"publish","type":"post","link":"https:\/\/python-programs.com\/method-overriding-in-python\/","title":{"rendered":"Method Overriding in Python"},"content":{"rendered":"

In this tutorial, let us look at what is method overriding in python along with examples, and its key features.<\/p>\n

Method overriding in Python:<\/strong><\/h4>\n

Method overriding is a form of Run time polymorphism. The child class provides the specific implementation of the method that is already provided by the parent class. It is used to change the behavior of existing methods, and method overriding requires at least two classes. In method overriding, inheritance is always required because it occurs between methods from the parent class (superclass) and the child class (child class).<\/p>\n

parent class:<\/strong> The class that is being inherited is known as the Parent or Superclass.<\/p>\n

child class:<\/strong> The class that inherits the parent class’s properties and methods is known as the Child or Subclass.<\/p>\n

Features of Method overriding<\/strong><\/h4>\n