class Student:
count = 0 # class variable
def __init__(self, name, id):
print('Constructor called')
self.name = name
self.id = id
Student.count += 1
self.
关于Python类的基本用法- student类
最新推荐文章于 2022-11-10 16:54:03 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)