The multiderived class inherits the properties of both class base1 and base2.
Let's see the syntax of multiple inheritance in Python.
class Base1:
pass
class Base2:
pass
class MultiDerived(Base1, Base2):
pass
>>> 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>
>>>