Examveda

What will be the output of the following Python code?
def f(x):
    def f1(*args, **kwargs):
        print("*"* 5)
        x(*args, **kwargs)
        print("*"* 5)
    return f1
def a(x):
    def f1(*args, **kwargs):
        print("%"* 5)
        x(*args, **kwargs)
        print("%"* 5)
    return f1
@f
@a
def p(m):
    print(m)
p("hello")

A. *****
%%%%%
hello
%%%%% *****

B. Error

C. *****%%%%%hello%%%%%*****

D. hello

Answer: Option A


This Question Belongs to Python Program >> Formatting And Decorators

Join The Discussion

Related Questions on Formatting and Decorators