Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Fruit():
- def __init__(self, color):
- self.color = color
- class Apple(Fruit):
- def __init__(self, color, seeds):
- self.seeds = seeds
- super().__init__(color)
- an_apple = Apple('red', 42)
- a_fruit = Fruit(an_apple)
Add Comment
Please, Sign In to add comment