Sitemap

What Are Python Operators?

1 min readSep 23, 2026

--

Python operators are symbols or keywords used to perform operations on values and variables. They help programmers perform calculations, compare values, make decisions, and manipulate data.

Press enter or click to view image in full size

Get Karthikanivas’s stories in your inbox

Join Medium for free to get updates from this writer.

Types of Python Operators

  1. Arithmetic Operators
    Used for mathematical calculations such as addition, subtraction, multiplication, division, modulus, and exponentiation.
  2. Comparison Operators
    Used to compare two values. They return either True or False. Examples include greater than, less than, equal to, and not equal to.
  3. Logical Operators
    Used to combine multiple conditions. The main logical operators are AND, OR, and NOT.
  4. Assignment Operators
    Used to assign values to variables and update their values. Examples include =, +=, -=, and *=.
  5. Membership Operators
    Used to check whether a particular value exists in a sequence or collection. The main operators are in and not in.
  6. Identity Operators
    Used to check whether two variables refer to the same object. The main operators are is and is not.
  7. Bitwise Operators
    Used to perform operations on binary numbers. They include AND, OR, XOR, NOT, left shift, and right shift.

In Short

Python operators make it easier to calculate, compare, assign, check, and manipulate data in Python programs.

--

--