摘要:
1.简单的继承 class Animal(): def __init__(self): pass def run(self): print('animal is running') class Dog(Animal): pass if __name__ =="__main__": dog=Dog() 阅读全文
摘要:
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(): _ 阅读全文