Python | Encapsulation Quiz | Question 4

Last Updated :
Discuss
Comments

How can you enforce encapsulation in Python?

By declaring all attributes as private

By using access modifiers like public, protected, and private

By using only getter methods for attribute access

By avoiding the use of encapsulation in code

Share your thoughts in the comments