3

Python Booleans: Leveraging the Values of Truth

 3 years ago
source link: https://realpython.com/courses/booleans-leveraging-truth/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Python Booleans: Leveraging the Values of Truth

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

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK