python 一切皆对象

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'

你可能感兴趣的:(python 一切皆对象)