def decor(func): def wrap(): print("============") func() print("============") return wrap def print_text(): print("Hello world!") print_text = decor(print_text)
@decor def print_text(): print("Hello world!")
0