python小程序,統計學生個數

class Student(object): count = 0 def __init__(self,name): self.name = name Student.count +=1 if Student.count != 0: print('測試失敗!') else: bart = Student('Bart') if Student.count != 1:
相關文章
相關標籤/搜索