摘要: 1.简单的继承 class Animal(): def __init__(self): pass def run(self): print('animal is running') class Dog(Animal): pass if __name__ =="__main__": dog=Dog() 阅读全文
posted @ 2020-09-16 17:33 Alantammm 阅读(110) 评论(0) 推荐(0) 编辑
摘要: class Demo1(): aa=123 def __init__(self,name,score): self.name = name self.score = score def func1(self): print(self.name,self.score) class Demo2(): _ 阅读全文
posted @ 2020-09-16 16:12 Alantammm 阅读(148) 评论(0) 推荐(0) 编辑