### Ticker

6/recent/ticker-posts

# operators in python programming

python programming tutorial free

Python Operators:

The Operators in Python are used for the operations between the variables and values

some operators are

+  ->  Addrition

-  ->   Subtraction

*  ->  Multiplication

/  ->   Division

Examples:

a = 5

b = 10

print(a+b)  # here we have used a operator to perfrom the addition operation

outpu: 15

Python mainly divided the operators into 7 types mainly

• Arithmetic Operators
• Assignment operators
• Comparison Operators
• Logical Operators
• Identity Operators
• Membership Operators
• Bitwise Operators

Arithmetic Operators:

-> The arithmetic operators are mainly used for the common mathematical operations

Operator          Name

+                     Addition

-                      Substraction

*                     Multiplication

/                     Division

%                    Modolus

**                   Exponention

//                 Floor Division

Assignment Operators:

->  The Assignment operators are used to assign values to the variables

Operators

=

+ =

- =

* =

/ =

% =

//=

**=

&=

| =

^ =

>> =

<< =

Comparison Operators:

Operator          Name

= =                   Equal to

!=                     Not equalto

>                      Greater than

<                       Less than

> =                    Greater than equal to

< =                     Less than equal to

Logical Operators:

Operator Name

->  AND

->  OR

-> NOT

Identity operators:

Operator Name

->  In

-> Not In

Bitwise Operators:

Operator          Name

&                      AND

|                          OR

^                        XOR

~                         NOT

<<                       Zero fill left shift

>>                       Right shift
Post Navi