Q12
What is the purpose of the property decorator in Python?
A.
To add properties to classes
B.
To remove properties from classes
C.
To define a getter method for a class attribute
AnswerD.
To define a setter method for a class attribute
Answer: Option C
Solution
Answer: Option C
Solution:
The property decorator is used to define a getter method for a class attribute.