Boolean Data
In Python, boolean
data has either a True
or False
value. For example,
PYTHON
1data = True
2data1 = False
Now, if we check the data types using type()
function:
PYTHON
1print(type(data))
2print(type(data1))
The output will be:
PYTHON
1<class 'bool'>
2<class 'bool'>
xxxxxxxxxx
data = True
data1 = False
print(type(data))
print(type(data1))
OUTPUT
:001 > Cmd/Ctrl-Enter to run, Cmd/Ctrl-/ to comment