Boolean data types are values that can only be one of two values, True or False. For example, the proposition 100 is more than 5 is True, and thus, it would have a True Boolean value. On the other hand, the proposition The sky is green is False, and thus, it would have a False Boolean value.
Booleans are largely associated with control statements, as they change the flow of the program, depending on the truthfulness of the specified quantities.
In Python, True and False are used to represent the two Boolean constants:
>>> True True >>> False False >>> print(type(True), type(False)) <class 'bool'> <class 'bool'>
We can see that the type of each expression is bool (short for Boolean). Like all other types, Booleans have operators that you can apply.