logo
Python Multiple Inheritance
Python supports multiple inheritance also. 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. 
Multiple Imheritance

The multiderived class inherits the properties of both class base1 and base2.

Let's see the syntax of multiple inheritance in Python.

Syntax :
class Base1:
    pass

class Base2:
    pass

class MultiDerived(Base1, Base2):
    pass
Multiple Inheritance Example :
>>> class First(object):
	def __init__(self):
		super(First, self).__init__()
		print("Free")

		
>>> class Second(object):
	def __init__(self):
		 super(Second, self).__init__()
		 print("Time")

		 
>>> class Third(Second, First):
	 def __init__(self):
		 super(Third, self).__init__()
		 print("Learning")

		 
>>> Third();
Free
Time
Learning
<__main__.Third object at 0x037EB830>
>>>