Q35
Which of the following is true for variable names in Python?
A.
underscore and ampersand are the only two special characters allowed
B.
unlimited length
AnswerC.
all private members must have leading and trailing underscores
D.
none of the mentioned
Answer: Option B
Solution
Answer: Option B
Solution:
In Python, variable names have the following characteristics:They can be of unlimited length, allowing for descriptive and meaningful names.
They can consist of letters (both uppercase and lowercase), digits, and underscores (_).
They cannot begin with a digit.
They are case-sensitive, meaning uppercase and lowercase letters are considered distinct.
Therefore, the correct statement for variable names in Python is that they have unlimited length.