Python Programming - Encapsulation - Discussion

Discussion Forum : Encapsulation - General Questions (Q.No. 6)
6.
What is the purpose of the double underscore prefix in Python, as in __variable?
To indicate a protected variable
To indicate a private variable
To indicate a global variable
To indicate a constant variable
Answer: Option
Explanation:
The double underscore prefix in Python, as in __variable, is used to indicate a private variable.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.