Python MCQ
Python MCQ
Python Variable Names Is Python case sensitive when dealing with identifiers?
Python Variable Names What is the maximum possible length of an identifier?
Python Variable Names Which of the following is true for variable names in Python?
all private
members
must have underscore and
leading and ampersand are the
trailing only two special
unlimited length underscores characters allowed none of the mentioned
a b c = 1000 a,b,c = 1000, 2000,
abc = 1,000,000 2000 3000 3000 a_b_c = 1,000,000
CorrectAnswer Explanation
a Case is always significant.
d Identifiers can be of any length.
All the statements will execute successfully but at the cost of
d reduced readability.
b Variable names should not start with a number.
As Python has no concept of private variables, leading
underscores are used to indicate variables that must not be
a accessed from outside the class.
a eval can be used as a variable
True, False and None are capitalized while the others are in
d lower case.