Vidyalelo
Python · Q7

Decorators in Depth

Programming · Python · question 7

Q7

What is a higher-order function in the context of decorators?

A.
A function that returns a function
B.
A function that takes a function as an argument
Answer
C.
A function that only contains decorators
D.
A function with multiple return statements

Answer: Option B

Solution

Answer: Option B
Solution:
Higher-order functions accept functions as arguments and/or return functions as results.