file.py
class Fruits:
def show(self):
print("This is Fruits class")
class Apple(Fruits):
def show(self):
print("Apple")
a=Apple()
a.show()
f=Fruits()
f.show()
output:
Output
Apple
This is Fruits class
class Fruits:
def show(self):
print("This is Fruits class")
class Apple(Fruits):
def show(self):
print("Apple")
a=Apple()
a.show()
f=Fruits()
f.show()
output:
Apple
This is Fruits class