Computer Science

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

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

Python Data Handling

2 Likes

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.

Answered By

2 Likes


Related Questions