# 定义装饰器函数
def decorate_output(func):
def wrapper(str):
print("**********")
func(str)
print("**********")
return wrapper
# 使用装饰器修饰output函数
@decorate_output
def output(str):
print(str)
# 从键盘输入字符串并调用output函数输出
input_str = input("请输入一串字符串:")
output(input_str)