adplus-dvertising
frame-decoration

Question

What is the output of the code shown below?
def f(x):
    def f1(*args, **kwargs):
        print("*", 5)
        x(*args, **kwargs)
        print("*", 5)
    return f1
@f
def p(m):
    p(m)
print("hello")

a.

*****
hello

b.

*****
*****
hello

c.

*****

d.

hello

Posted under Python

Answer: (d).hello

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

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