In this article / tutorial we will learn about Python all basic operators. When we process, calculate and compare values or variables then we use operators. Operators have too much important role in any kind of programming language. Without Operators programming is nothing. Operators make relations between two or more variables and functions. There are many types of Operators you can see below

**Arithmetic Operators****Assignment Operators****Comparison Operators****Logical Operators****Identity Operators****membership Operators****Bitwise Operators**

### 1) Python Arithmetic Operators

Arithmetic operators are used for mathematics or calculations. There are following arithmetic operators in Python

**See examples to understand how to use Arithmetic Operators (Click Here)**

Operators | Names | Examples |

+ | Addition | z+r |

– | Subtraction | z-r |

* | Multiplication | z*r |

/ | Division | z/r |

% | Modulus/Remainder | z % r |

** | Exponent | z**r |

### 2) Python Assignment Operators

Assignment Operators are used for assigning the values to variables. . You can see below the types of Assignment Operators in Python.

**Check Examples to understand how to use Assignment Operators (Click Here)**

Operators | Names | Examples | Is equal to this |

= | Equal | z=9 | z=9 |

+= | Add Equal | z+=9 | z=z+9 |

-= | Subtract Equal | z-=9 | z=z-9 |

*= | Multiply Equal | z*=9 | z=z*9 |

/= | Divide Equal | z/=9 | z=z/9 |

%= | Modulus Equal | z %= 9 | z=z%9 |

**= | Exponent Equal | z**=9 | z=z**9 |

//= | Floor Equal | z//=9 | z=z//9 |

&= | And Equal | z&=9 | z=z&9 |

|= | Or Equal | z|=9 | z=z|9 |

### 3)Python Comparison Operators

Comparison operators are used to comparing the values and variables. There are following Types of Comparison Operators

**Check Examples to understand how to use Comparison Operators (Click Here)**

Operators | Names | Examples |

== | Equal to | z==r |

!= | Not Equal to | z!=r |

> | Greater Than | z>r |

< | Smaller Than | z<r |

>= | Greater Than or Equal to | z>=r |

<= | Smaller Than or Equal to | z<=r |

### 4)Python Logical Operators

We use logical operators commonly to combine the two conditional statements of the comparison operators. For example if your age is more than 20 years and less than 22 years. See following the types of the logical operators

**Check Examples to understand how to use Logical Operators (Click Here)**

Operators | Names | Example |

and | Logical AND | z>4 and z<9 |

or | Logical OR | z<4 or z>9 |

not | Logical NOT | not(z<4 and z>9) |

### 5)Python Identity Operators

We use Identity Operators to compare the two objects memory locations. See below the Identity Operators

**Check Examples to understand how to use Identity Operators (Click Here)**

Operators(syntax) | description(use) | Example |

is | Return true if both variables are with same objects | Z is R |

is not | Return false if both variables are not with same object | Z is not R |

### 6)Python membership Operators

We use membership operators to check membership/value in a sequence like, lists, strings and tuples. you can see below the membership operators

**Check Examples to understand how to use membership Operators (Click Here)**

Operators(syntax) | description(use) | Example |

in | Return true if value is present in the object | Z in R |

not in | Return false if value is not present in the object | Z not in R |

### 7)Python Bitwise Operators

We use Bitwise Operators to compare the binary numbers. There are following Bitwise Operators you can see below

Operators(syntax) | Names | description(use) |

& | Binary AND | Copy a bit if bit exist in both operands |

| | Binary OR | Copy a bit if bit exist in at least one operand from two |

^ | Binary XOR | Copy a bit if bit is set in one operand but not in both |

~ | Binary Open Compliment/NOT | It inverts the bits |

<< | Binary Left Shift | Left Operands Value is shifted left |

>> | Binary Right Shift | Left Operands value shifted Right |