https://www.geeksforgeeks.org/types-of-inheritance-python/
Inheritance is defined as the mechanism of inheriting the properties of the base class to the child class. Here we a going to see the types of inheritance in Python.

Single inheritance enables a derived class to inherit properties from a single parent class, thus enabling code reusability and the addition of new features to existing code.

When a class can be derived from more than one base class this type of inheritance is called multiple inheritances. In multiple inheritances, all the features of the base classes are inherited into the derived class.

class Mother:
mothername = ""
def mother(self):
print(self.mothername)
class Father:
fathername = ""
def father(self):
print(self.fathername)
# Driver's code
class Son(Mother, Father):
def parents(self):
print("Father :", self.fathername)
print("Mother :", self.mothername)
s1 = Son()
s1.fathername = "RAM"
s1.mothername = "SITA"
s1.parents()
In multilevel inheritance, features of the base class and the derived class are further inherited into the new derived class. This is similar to a relationship representing a child and a grandfather.

class Father:
def __init__(self):
print('Father Custrotor method')
def showF(self):
print('Father Class method')
class Son(Father):
def __init__(self):
super().__init__() # call Father cunstructor class
print('Son Custrotor method')
def showS(self):
print('Son Class method')
class Grandson(Son):
def __init__(self):
super().__init__() # call Son cunstructor class
print('Grandson Custrotor method')
def showG(self) :
print('Grandson Class method')
obj =Grandson()
obj.showF()
obj.showS()
obj.showG()
When more than one derived class are created from a single base this type of inheritance is called hierarchical inheritance. In this program, we have a parent (base) class and two child (derived) classes.

class Father:
def showF(self):
print('Father Class method')
class Son(Father):
def showS(self):
print('Son Class method')
class Daughter(Father):
def showD(self) :
print('Daughter Class method')
#== to access the father class method we will create an instance of Son class OR Daughter Class
s =Son()
s.showF()
s.showS()