...

Web Technologies - PYTHON

Back to Course

Lesson Description


Lession - #268 Python Booleans


What are Booleans in Python?

Python boolean type is one of the build-in data types provided by Python, which represents one of the two values that is true or False. It is utilized to address reality upsides of the articulations. For instance, 1== 0 is True though 2<1 is False.

The output shows the variable is a boolean data type.

Let's see a example



a = True
print(type(a>
>
# Returns False as x is not equal to y x = 5 y = 10 print(bool(x==y>
>
# Returns False as x is None x = None print(bool(x>
>

Output


Try it here