What is the purpose of a single underscore _ in Python variables name?
Explanation
Single underscore in variable name is an analogue of making variable “protected” by analogy with many other programming languages. Such variables are not imported when “from my_module import *” is used

Follow CodeGalaxy

Mobile Beta

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