Examveda
Examveda

How can you pass arguments to a decorator in Python?

A. By modifying the decorator's code

B. By using the @decorator syntax

C. By defining arguments within the function

D. By using the args keyword

Answer: Option B

Solution(By Examveda Team)

Arguments can be passed to decorators using the @decorator(arg) syntax.

This Question Belongs to Python Program >> Decorators In Depth

Join The Discussion

Related Questions on Decorators in Depth