Python Programming, Boolean Data Type

Опубликовано: 18 Март 2021
на канале: Quick Programming Concepts
614
6

#shorts

This quick video shows how the boolean data type works in Python. This video is intended for those who are new to Python or programming.

Boolean or bool is a type of data in Python. It can be defined with True or False. Note that casing matters (True vs true).

Boolean examples:
example = True
example_2 = False

Also since conditional statements work on True/False, you can use a shortcut in conditional writing by just checking for True/False, for example:

If True:
print('The value of the conditional is True')