Python Language / Python InheritanceInheritance means acquiring the properties and methods of a parent / base / super class by child/ derived/leaf class.Example
Types of Inheritance Python supports 4 types of inheritance based on number of child and parent classes involved. They were 1. Single Inheritance. 2. Multiple Inheritances. 3. Multilevel Inheritance. 4. Hierarchical Inheritance. Single Inheritance
Multiple Inheritance If a single child class inherits a more than one parent class is called as Multiple Inheritance.
Multilevel Inheritance If a single child class is inherited by another child class called as Multilevel Inheritance.
Hierarchical Inheritance Hierarchical Inheritance involves multiple inheritance from the same base or parent class.
|