1)
Single
Inheritance –
A child class inherits only a single parent class .
Single Inheritance |
Program -
#single inheritance
class parent:
def first(self):
print("First Function")
class child(parent):
def second(self):
print("Second Function")
ob = child() # Object Created
ob.second()
ob.first()
Second Function
First Function
Post a Comment