Python Boolean Type
The boolean value can be of two types only i.e. either True or False. The output <class ‘bool’> indicates the variable is a boolean data type.
Python3
a = True type (a) b = False type (b) |
Output:
<class 'bool'>
<class 'bool'>
Python Boolean
Python boolean type is one of the built-in data types provided by Python, which represents one of the two values i.e. True or False. Generally, it is used to represent the truth values of the expressions.
Example
Input: 1==1
Output: True
Input: 2<1
Output: False