Operators - Python

  • Arithmetic
    • + => Addition
    • - => Subtraction
    • * => Multiplication
    • / => Division
    • // => Floor Division
    • ** => Exponential
    • % => Modulo
  • Comparison
    • , <, !=, >=, <=

    • == => Compares values
  • Bitwise
    • &, |, >>, <<
  • Assignment
    • =, +=, -=, *=, /=, %=
  • Logical
    • and, or, not
    • is, is not => Compares exact location of object in memory
      • Immutable/Constants values are created only once
  • Membership
    • in, not in
Share: