In this we are going to see a simple hybrid inheritance program in Python Programming Language.
class Parent1:
def func1(self):
print("this is function one")
class Parent2:
def func2(self):
print("this is function two")
class Child(Parent1,Parent2):
def func3(self):
print("this is function three")
class gchild1(Child):
def func4(self):
print("this is function four")
class gchild2(Child):
def func5(self):
print("this is function five")
y = gchild1()
y.func1()
y.func2()
y.func3()
y.func4()
# Coded by Saahil
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP