BooleansΒΆ
Python has a boolean type, expressed with reserved words True
and False
.
>>> type(true)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'true' is not defined
>>> type(True)
<type 'bool'>
>>> type(True) == type(1)
False