Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Shape:
- squs = []
- def __init__(self, w, h):
- self.width = w
- self.height = h
- self.squs = squs
- class Square(Shape):
- def go_list(self):
- super().__init__(self)
- return self.squs.append(self.width)
- S1 = Square(20, 20)
- print(s1.go_list())
- S2 = Square(10, 10)
- print(s2.go_list())
Add Comment
Please, Sign In to add comment