Examveda

How do you create a custom decorator in Python?

A. By modifying the built-in decorators

B. By using the @custom_decorator syntax

C. By importing decorators from external libraries

D. By defining a function and using the @ symbol

Answer: Option D

Solution (By Examveda Team)

You create a custom decorator by defining a function and using the @decorator_name syntax.

This Question Belongs to Python Program >> Decorators In Depth

Join The Discussion

Related Questions on Decorators in Depth