Python
What is th ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
What is the purpose of a single underscore _ in Python variables name?
It indicates that variable is immutable
It raises a flag to other developers that this variable is important
It indicates that variable is of complex data type
It indicates that this variable is always passed by reference
It makes variable protected in a sense of many programming languages
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
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
P
ython
Quiz
Login to learn Python
or
Read more about
Python Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
Python quizzes
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
int i = Integer.MAX_VALUE + 10; What is th...
What happens after the following code is compiled and run: ...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment