python 一切皆对象
2018-04-09 本文已影响12人
风___________
def hi(name="yasoob"):
return "hi " + name
print(hi()) #output: 'hi yasoob'
greet = hi
print(greet())#output: 'hi yasoob'
del hi
print(hi())#outputs: NameError
print(greet())#outputs: 'hi yasoob'