Question OOP-ENC-0007
EasyIn Python, what does a leading double underscore (as in __balance) do to an attribute name?
- A.
It makes the attribute truly private and inaccessible
- B.
It deletes the attribute
- C.
Show answer and explanation
Answer: D
Python changes __balance to _ClassName__balance. It is a convention-based protection, not a strict one.