class Person: counter = 0 def __init__(self,name, age): self.__name = name self.__age = age Person.counter = (int) (Person.counter) + 1 self.__id = Person.counter @classmethod def from_string(cls, person_str): l=person_str.split(",") cls.__name=l[0] cls.__age=int(l[1]) p=Person(cls.__name,cls.__age) return(p) def initialize_counter(value): Person.counter=value def __str__(self): return("%s is %s years old and her id is %s" %(self.__name,self.__age,self.__id))