Python - Encapsulation and Data Protection
Which of the following is the correct way to define a read-only property named age in a Python class?
Which of the following is the correct way to define a read-only property named age in a Python class?
@property decorator on a method that returns the value.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions