爬蛇的博客  
#编写一个装饰器
def zs(x):
    def h():
        return "4"+x()
    return h

@zs
def hhh():
    return "你好"
print(hhh())


---------运行结果-------------
4你好

 

posted on 2019-07-16 14:15  爬蛇  阅读(138)  评论(0编辑  收藏  举报