Guest User

Untitled

a guest
Jan 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. class Fruit():
  2. def __init__(self, color):
  3. self.color = color
  4.  
  5. class Apple(Fruit):
  6. def __init__(self, color, seeds):
  7. self.seeds = seeds
  8. super().__init__(color)
  9.  
  10. an_apple = Apple('red', 42)
  11. a_fruit = Fruit(an_apple)
Add Comment
Please, Sign In to add comment