Skip to content

Operators¶

About This Lesson¶

Master Python's operators for performing calculations, comparisons, and logical operations. This lesson covers arithmetic, comparison, logical, bitwise, assignment, and membership operators.

What You'll Learn¶

  • Arithmetic operators (+, -, , /, %, //, *)
  • Comparison operators (==, !=, <, >, <=, >=)
  • Logical operators (and, or, not)
  • Bitwise operators
  • Assignment operators
  • Membership operators (in, not in)
  • Identity operators (is, is not)
  • Use the MkDocs navigation on the left to move between lessons
  • The notebook below is fully interactive - you can run and edit code
  • Your changes are saved in your browser's local storage

Interactive Notebook¶


Having trouble with the embedded notebook? Try one of these: