Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class students:
- def __init__ (self,a,b):
- self.name=a
- self.age=b
- def disp(self):
- print("name is "+self.name+" age is "+str(self.age))
- class cld(students):
- def __init__(self):
- print("child")
- c=cld()
- a=students("jack",22)
- a.disp()
- c.disp()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement