1 class a: 2 def change(self, sign, call): 3 self.first = sign 4 self.second = call 5 first = ‘first‘ 6 second = ‘second‘ 7 8 z = a() 9 print("赋值前:sign = ", z.first) 10 c = a() 11 print("赋值前:call = ", c.second) 12 13 z.change("hahah", "oooo") 14 print("赋值后:", z.second, z.first)
输出结果:
待补
原文地址:https://www.cnblogs.com/p36606jp/p/8331223.html
时间: 2024-10-30 17:31:54