python练习4 类相关操作
摘要:
class MyClass: myNum = 0 #相当于类的变量 def __init__(self, name): self.name = name self.data = 0 MyClass.myNum += 1 #print("self:", self) #print("__class__: 阅读全文
posted @ 2023-10-14 20:06 悉野 阅读(3) 评论(0) 推荐(0) 编辑