python tutorial - Python Multiple Inheritance | Multiple Inheritance in Python - learn python - python programming
- A class can be derived from more than one base classes in Python. This is called multiple inheritance.
- In multiple inheritance, the features of all the base classes are inherited into the derived class.
- The syntax for multiple inheritance is similar to single inheritance.
- Python supports multiple inheritance also. You can derive a child class from more than one base (parent) class.
Python Multiple Inheritance Example:
- Here, MultiDerived is derived from classes Base1 and Base2.
Image representation:
- The multiderived class inherits the properties of both class base1 and base2.