class parent:
def init(self,name,sex):
self.nsme = name
self.sex = sex
def study(self):
print(“人生来就会学习”)
class son(parent):
def study(self,str1,str2):
print(“这个小傻非常喜欢学习{},{}”.format(str1,str2))
son1 = son(“小傻”,“人”)
son1.hight = 150
print(son1.hight)
son1.study(“喜欢吃”,“喜欢玩”)
2021-01-03
最新推荐文章于 2024-09-04 20:18:34 发布