class Person: def setName(self, name): self.name = name def getName(self): return self.name def greet(self): print "Hello, world! I'm %s." % self.namefoo = Person()bar = Person()foo.setName('A')bar.setName('B')foo.greet()bar.greet()print foo.name bar.greet()
Name (required)
email (will not be published) (required)
Website