Python Programming - Encapsulation - Discussion

Discussion Forum : Encapsulation - General Questions (Q.No. 37)
37.
In Python, what is the purpose of using a double underscore prefix in a method name, such as __method()?
To define a private method
To create a public method
To indicate a class method
To access a global method
Answer: Option
Explanation:
The double underscore prefix in a method name in Python, such as __method(), is used to define a private method.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.