立即学习:https://edu.csdn.net/course/play/24797/282187?utm_source=blogtoedu
class TestA: def __init__(self,height=11): self.height =height def testa(self): self.height +=10 return self def testb(self): self.testa() testbname = 'testbb' return testbname ta = TestA() print(ta.height) ta2 = TestA('testaa') print(ta2.height) ta3 =TestA() ta3.testa().testa().testa() TestA.testa(ta3) print(ta3.testb()) print(ta3.height)