Which of the following variable names are illegal? (Select two answers)

Which of the following variable names are illegal? (Select two answers)
A . TRUE
B. True
C. true
D. and

Answer: B, D

Explanation:

Topics: variable names keywords True and

Try it yourself:

TRUE = 23

true = 42

# True = 7  # SyntaxError: cannot assign to True

# and = 7   # SyntaxError: invalid syntax

You cannot use keywords as variable names.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments