Real Python: Python Booleans: Leveraging the Values of Truth

image

Understanding how Python Boolean values behave is important to programming well in Python. The Python Boolean type is one of Python’s built-in data types. It’s used to represent the truth value of an expression. For example, the expression 1 <= 2 is True, while the expression 0 == 1 is False.

In this course, you’ll learn how to:

  • Use Python Booleans to write efficient and readable Python code
  • Manipulate Boolean values with Boolean operators
  • Convert Booleans to other types
  • Convert other types to Python Booleans

Comments are closed.