Some work of Super
#! Some work of super
class Grandfather:
def __init__(self,salary1):
self.money=salary1
def showg(self):
print("grand father class instance mathod")
munna=Grandfather("1 lakh")
shohan=Grandfather("50 hazar")
class Father(Grandfather):
def __init__(self,moneyo):
self.money=moneyo
super().__init__(moneyo)
def showf(self):
print("father class instance mathod")
dulu=Father("9 lakh")
print(munna.money)
print(dulu.money)
print(shohan.money)
Comments
Post a Comment