Close

Python Boolean

[Last Updated: Feb 2, 2022]

A boolean type can have value True or False.

scripts/bool.py

a = True
b = False
c = 5 < 3
print(a)
print(b)
print(c)
# printing type
print(type(a))

Output

True
False
False
<class 'bool'>

Example Project

Dependencies and Technologies Used:

  • Python 3.10.2
Python Boolean Type Select All Download
  • python-boolean-type
    • scripts
      • bool.py

    See Also