Python Programming - Encapsulation - Discussion
Discussion Forum : Encapsulation - General Questions (Q.No. 3)
3.
What is the purpose of the
@property
decorator?
Answer: Option
Explanation:
The
@property
decorator is used in Python to define a getter method for a class attribute, allowing controlled access.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers