Which of the following attributes are private? (select three)

Questions & AnswersCategory: PythonWhich of the following attributes are private? (select three)
1 Answers
Lokesh Kumar Staff answered 2 years ago

a. __slug__
b. __urlpath
e. __slug
Explanation:
Python doesn’t have any mechanism that effectively restricts access to any instance variable or method. Python prescribes a convention of prefixing the name of the variable/method with a single or double underscore to emulate the behavior of protected and private access specifiers. The double underscore __ prefixed to a variable makes it private. It gives a strong suggestion not to touch it from outside the class. Any attempt to do so will result in an AttributeError.