Which of the following is correct for Identifiers name used in Python language?
2024
Which of the following is correct for Identifiers name used in Python language?
- A.
An identifier can have underscore (_) symbol
- B.
We must use keywords as identifier
- C.
There is restriction the length of an identifier
- D.
An identifier must start with a digit
Attempted by 146 students.
Show answer & explanation
Correct answer: A
A Python identifier can contain letters, digits, and underscores, but it cannot be a keyword and cannot start with a digit. Therefore an identifier can have the underscore (_) symbol.