Here is the code:
class className:
def createName(self, name):
self.name = name
def displayName(self):
return self.name
def saying(self):
print "Hello %s " % self.name
first = className()
second = className()
first.createName('Bob')
second.createName('Tony')
print first.displayName()
print second.displayName()
print 20*"_"
print first.saying()
print second.saying()
The question is the following - when I call the second method (saying) why is the result:
Hello Bob
None
Hello Tony
None
Why the None?