Examveda

What is the purpose of the @property decorator in Python classes?

A. It allows you to define a method that can be accessed like an attribute

B. It defines a property

C. It defines a method

D. It defines a constructor

Answer: Option A


This Question Belongs to Python Program >> Classes And Objects In Python

Join The Discussion

Related Questions on Classes and Objects in Python