What is the purpose of double underscore __ in Python variable name?
Explanation
Variables whose name begins with double underscore are treated by interpreter as class private. Internally they will be renamed to _ClassName__VariableName to prevent unwanted access to them by other engineers

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Python quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes