To implement inheritance in python3.
Like other object oriented language python also does inheritance.
To create new class from base class stats and behaviour.
Base class act as like parent class.
Inherited class act like child class.
It gives the the oops concept of re usability.
Body of base class
class DerivedClass(BaseClass):
Body of derived class
#Parent class
class car:
#parent class method
def models(self):
print(‘Four wheel’)
#child class
class bike(car):
#child class method
def model(self):
print(‘Two wheeler’)
#object creation for child class
a=bike()
#call parent class method using child class object
a.models()
a.model()