Posted On: Feb 22, 2018
Python also supports Inheritance as well as Multiple Inheritance. Any class can inherit behaviour as well as attributes methods from different class, known as superclass. A class that inherits from a superclass is known as subclass. Another name for superclasses is ancestors too. There presents a hierarchy association between classes.
Syntax of Inheritance in Python:
class BaseClass: Body of base class class DerivedClass(BaseClass): Body of derived class
Various types of Inheritance
Never Miss an Articles from us.
Java and Python are way different from each other, but both of them can be useful tools for high-tech developers. Also, ..
Python uses its own techniques to implement exception handling. <try-except> is the block that can be utilized by..
Modules can be defined as the Python files with an extension “.py”. The module name will be same as that of the fil..