adplus-dvertising
frame-decoration

Question

What are the output of the code shown below?
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: (a).*****
%%%%%
hello
%%%%%
*****

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What are the output of the code shown below?