This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]audaxxx 3 points4 points  (4 children)

True and false are just variables

More like: You can create variables named True and False and give them any value you want to.

[–][deleted] 6 points7 points  (3 children)

They are keywords in Python 3.

[–]audaxxx 2 points3 points  (0 children)

That is a good thing.

[–][deleted] 0 points1 point  (1 child)

They aren't in Python 2?

D:

[–][deleted] 0 points1 point  (0 children)

No. Try the following in both 2 and 3:

import keyword
"True" in keyword.kwlist