NoReservedWords
Misconception:
Anything that starts with a letter or underscore and consists of just letters, digits, and underscores can be used as an identifier (name of a variable, method, or class).
Incorrect
Every sequence of letters and digits starting with a letter or an underscore can be used as an identifier
Correct
Some character sequences are reserved for use as keywords and cannot be used as identifiers
CorrectionHere is what's right.
Here is what's right.
Python has some keywords (e.g. return
, if
, continue
)
and some literals (True
, False
, and None
)
that are reserved and cannot be used by a programmer as identifiers.
That means it is not possible to use these words to name variables, methods, or classes.