Python Multiple Inheritance || Example-1 || Multiple Inheritance || Python
In this we are going to see a basic example of multiple inheritance in Python Programming Language.



class PParent():
    def PFunc(self):
        print('Paternal function')

class MParent():
    def MFunc(self):
        print('Maternal function')


class Child(PParent, MParent):
    def CFunc(self):
        print('Child function')


ob = Child()
ob.CFunc()
ob.PFunc()
ob.MFunc()

# Coded by SAAHIL


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post