Computer Science
Which of the following is not considered a valid identifier in Python ?
- two2
- _main
- hello_rsp1
- 2 hundred
Python Data Handling
3 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
1 Like
Related Questions
Lists and strings in Python support two-way indexing.
Tuples can be nested and can contain other compound objects like lists, dictionaries and other tuples.
What will be the output of the following code —
print("100 + 200")
?- 300
- 100200
- 100 + 200
- 200
Which amongst the following is a mutable data type in Python ?
- int
- string
- tuple
- list