Examveda

What will be the output of the following Python code?
def mk(x):
    def mk1():
        print("Decorated")
        x()
    return mk1
def mk2():
    print("Ordinary")
p = mk(mk2)
p()

A. Decorated
Decorated

B. Ordinary
Ordinary

C. Ordinary
Decorated

D. Decorated
Ordinary

Answer: Option D


This Question Belongs to Python Program >> Formatting And Decorators

Join The Discussion

Related Questions on Formatting and Decorators