0%
简介
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
class Parent(): def talk(self): print('小木的爸爸说了一句话')
class ChildOne(Parent): def run(self): print('小木在跑步') def talk(self): print(': 小木在说话')
if __name__ == '__main__': xiaomu_brother = ChildOne() xiaomu_brother.run() xiaomu_brother.talk()
|