# Operators in Python Programming Language

Operators are fundamental part of a programming language as these are used for doing Mathematics on different entities. Operators are special symbols which can be used for doing different kind of computations like arithmetic or logical computations.
For example – You may want to add two numbers together, how to do this just use plus operation 10 + 23.
Python operators can be divided into 7 categories – Arthimetic, Assignment, Comparison, Logical, Identity, Membership and Bitwise.
These operators are applied to certain values and those values are called Operands.

## Arithmetic Operators in Python

Operators which are used for mathematical operations like doing addition, subtraction, multiplication or division.
Below table lists all of Arithmetic Operators in Python with examples for each one.

## Assignment Operators in Python

In Python, Assignment Operators are used for assigning values to variables. For example => a = 5 here = equal symbol is an assignment operator.
Below table lists all of Assignment Operators in Python with examples for each one.

## Comparison Operators in Python

In Python Programming Language, Comparison Operators are used for comparing two values. For example – If we have two variables then to check which is greater that other Comparison Operator can be used.
Below is a table listing Comparison Operators in Python with some examples for each one.

## Logical Operators in Python

Python have three logical operators – And, OR, Not. These can be used for Control Flow in program based upon how variables evaluate in program.
Below is a table listing all of Logical Operators in Python with some example for each one.

## Identity Operators in Python

Identity Operators are for checking whether two identities(say two variables) are located on same piece of memory.
Below is a diagram showing what does it mean to be on same piece of memory.

Below is a table listing all identity operators in Python with some examples for each one.

## Membership Operator in Python

In Python Programming Language, Membership Operator is used for checking whether some value is a member of sequence. For example – If we have a list [ 19, 28, 21 ] then to check whether 19 is there in list. We can do 19 in list membership test, where in is a Membership Operator.

If your not aware of What are sequences in Python? Or What are other 5 data types expect Sequences? then check out below article.

Below is a table listing all of Python’s Membership Operators with examples for each one.

## Bitwise Operators in Python

These operators treat operands in binary format rather than normal format.
Below is a table listing Python’s Bitwise Operators with some examples for each one.

Josh

Hi, I'm Josh a Computer Science graduate from California State University, Sacramento since coming out with my Master's from university. I've worked with multiple startups across US and in UK as well primarily as a Python Developer. Here on this website, I'm sharing my knowledge of Python. If you want to ask me anything about Python feel free to reach out, I would be happy to help you out.