- 博客(2)
- 收藏
- 关注
原创 python中类属性,实例属性,实例访问类属性
class Student: count = 10 def __init__(self, name): self.name = names1 = Student('xiaoming')Student.count = 33print(s1.count)print(Student.count)1010class Student: count = 10 def __init__(self, name): self.name = n
2022-03-09 09:33:22
1882
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人