Basic Data Types

Take a look at basic data types in Python.

Boolean

The Boolean data type is a “truth” value of either ​True​ ​or False​.

These are important Boolean operators ordered by priority (from highest to lowest):

  • not​ x​ → “if x is False, then x, else y
  • x ​and​ y​ → “if x is False, then x, else y
  • x ​or​ y ​ → “if x is False, then y, else x

Example

Get hands-on with 1400+ tech skills courses.