class Person(object):
count = 0
def how_many():
return Person.count
def __init__(self, name):
self.name = name
Person.count = Person.count + 1
print (Person.how_many())
p1 = Person('Bob')
pardon110
相关分类