SHOW:
|
|
- or go back to the newest paste.
1 | class Animal: | |
2 | def say(self): | |
3 | print('i am animal') | |
4 | ||
5 | ||
6 | class Cat(Animal): | |
7 | pass | |
8 | ||
9 | ||
10 | class Robot: | |
11 | def say(self): | |
12 | print('i am robot') | |
13 | ||
14 | ||
15 | class RoboCat(Cat, Robot): | |
16 | pass | |
17 | ||
18 | ||
19 | robo = RoboCat() | |
20 | robo.say() | |
21 |