# Python – Operators

Operators in Python are used to perform operations on values and variables in general. Standard symbols for logical and mathematical operations are represented by these symbols. We’ll look at numerous types of Python operators in this tutorial.

## Types of Operator

Python language supports the following types of operators.

• Arithmetic Operators
• Comparison (Relational) Operators
• Assignment Operators
• Logical Operators
• Bitwise Operators
• Membership Operators
• Identity Operators

Let us have a look on all operators one by one.

## Arithmetic Operators

To conduct arithmetic operations between two operands, arithmetic operators are employed. There are operators for + (addition), – (subtraction), (multiplication), /(divide), percent (reminder), /(floor division), and exponent (*).

Consider the following table for a detailed explanation of arithmetic operators.

## Comparison operators

Comparison operators are used to compare values. It returns either `True` or `False` according to the condition.

## Assignment operators

To assign values to variables in Python, assignment operators are used.

`a = 10 ` is a simple assignment operator that assigns the value 5 on the right to the variable a on the left.

There are various compound operators in Python like `a +=10 `that adds to the variable and later assigns the same. It is equivalent to `a = a + 10 `.

## Bitwise Operators

Bitwise operators act on bits and perform the bit-by-bit operations. These are used to operate on binary numbers.

## Logical Operators

Logical operators perform Logical ANDLogical OR, and Logical NOT operations. It is used to combine conditional statements.

### Membership operators

In Python, the membership operators are in and not in. They check whether a value or variable exists in a sequence (string, list, tuple, set, and dictionary).

In a dictionary we can only test for presence of key, not the value.

## Identity Operators

The identity operators are used to decide whether an element certain class or type.