显示有个None
class Pepole():
def __init__(self,name):
self.name = name
def speak(self):
print("my name is %s"%(self.name))
xiaoming = Pepole("xioaming")
xiaohong = Pepole("xioahong")
print xiaoming.speak()
print xiaohong.speak()
print (xiaoming is xiaohong)
print ("xxxxxxxxxxxxxxx")
打印:
“xioaming”
None
"xiaohong"
None
这个None是哪里打印的