← Quiz: Python Decorators: all 10 questions
Quiz: Python Decorators · Question 7 of 10
How many nested functions does a decorator with arguments, like @repeat(3), usually have?
How many nested functions does a decorator with arguments, like @repeat(3), usually have?
- A.One
- B.Two
- C.Three
- D.Four
Answer & explanation
Correct answer: Three
repeat(times) returns decorator(func), which returns wrapper.
Can you get the rest right without peeking?
Take the timed Quiz: Python Decorators quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →