class AddrBookEntry(object): def __init__(self, nm, ph): self.name = nm self.phone = ph print 'Created instance for:', self.name def updatePhone(self, newph): self.phone = newph print 'Updated phone# for:', self.namejohn = AddrBookEntry('A', '000-555-1212')jane = AddrBookEntry('B', '111-555-1212')print johnprint john.nameprint john.phoneprint jane.nameprint jane.phonejohn.updatePhone('111-555-1212')print john.phone
Name (required)
email (will not be published) (required)
Website