CBSE Class 12 Computer Science Question 27 of 120

Review of Python Basics — Question 1

Back to all questions
1
Question

Question 1

Which of the following is not considered a valid identifier in Python ?

  1. two2
  2. _main
  3. hello_rsp1
  4. 2 hundred
Answer

2 hundred

Reason — The identifier "2 hundred" is not considered valid in Python because identifiers cannot start with a digit and should not include spaces. They must start with either a letter (a-z, A-Z) or an underscore (_) followed by letters, digits, or underscores.