python实现装饰器

#编写一个装饰器
def zs(x):
    def h():
        return "4"+x()
    return h

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


---------运行结果-------------
4你好
原文地址:https://www.cnblogs.com/tzxy/p/11194608.html