Skip to main content

Write a program to implement abstraction.

· One min read
Kaustubh Kulkarni
file.py
class One:
def disp(self):
pass
class Two(One):
def disp(self):
print("Abstract method body in sub Class")
obj = Two()
obj.disp()

output:

Output
Abstract method body in sub Class