Python Interview Questions #23

Опубликовано: 15 Июль 2026
на канале: Jobi ai
54
1

Question: Describe the purpose of the property decorator in Python.

Answer: The property decorator in Python is used to define methods that act as getters, setters, and deleters for class attributes. It allows controlled access and modification, enabling encapsulation and data validation.