What Will Be The Output Of The Following Python Codep Pre #133
What will be the output of the following Python code?</p> <pre><code class="language-python">def mk(x): def mk1(): print("Decorated") x() return mk1 def mk2(): print("Ordinary") p = mk(mk2) p()</code></pre>
This multiple choice question (MCQ) is related to the book/course
gs gs109 Python.
It can also be found in
gs gs109 Formatting & Decorators in Python - Python Decorators - Quiz No.1.
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()
Decorated Decorated Ordinary Ordinary Ordinary Decorated Decorated Ordinary