Skip to content

Instantly share code, notes, and snippets.

@Abhayparashar31
Last active December 15, 2020 12:31
Show Gist options
  • Save Abhayparashar31/953c2609feb2e7612b7f29484e9ca8ed to your computer and use it in GitHub Desktop.
Save Abhayparashar31/953c2609feb2e7612b7f29484e9ca8ed to your computer and use it in GitHub Desktop.
class add:
def __init__(self,a,b):
self.a = a
self.b = b
def add(self):
print(self.a+self.b)
class sub(add):
def __init(self):
super().__init()
super().__init()
def sub(self):
print(self.a-self.b)
ope = sub(10,5)
ope.sub()
--------------------------
5
ope.add()
---------------
15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment