# Complete instructions of Python Operators Instruction of python operators

## Defined Python operators

The operators are defined as symbols that can multiply the value of the operant. Here including values that an operator acts on are called operants. All operations are used to perform variables and values.

For the example of – 12 + 7 = 19, here ‘+’  sign is the operator, 12 and 7 that are called operands and output 19 is the operation.

print(12 + 7)

Output – 19

Key Points:-

• # Python operators basic
• Operation types of python
• Example of every types operators

## Types of Python Operators

Operators work as a pillar of a program that is built-in separate code. Python provides the a variety of programs that including below –

1. Arithmetic Operators
2. Assignments Operators
3. Comparison/ relational operators
4. Logical Operators
5. Membership Operators
6. Identity Operators
7. Bitwise Operators

Let’s go to see all the operators one by one.

### Arithmetic operators

When we want to use mathematical operators including a python, here you need to add a numeric variable that is called Arithmetic operators. The basic thing of operations needs to be operated.

Arithmetic operators including points are additions (+), subtraction (-), multiplications (*), divide (/), reminder (%), exponent (**), floor division (//) operators.

### Assignments Operators

These operators are assigned two value operators. It is the various component operators in python

### Comparison/ relational operators

Comparison/ relational operators compare the values of either site and show the result either TRUE and FALSE according to these two conditions. Basically, Comparison operators compare two values.

Example of comparison operators –

### Logical Operators

These operators are used to combine conditional statements. Basically, these operators used to make a decision. Python supports three logical operators ‘and’, ‘or’, ’not’ operators.

For Example of logical operators –

a=man

s=woman

print( a and s is a and s)

The Output of these-

a and b is False

### Membership Operators

These operators are used to test if a sequence was an object (like string, set, list, tuple, dictionary). There are two kinds of python membership operators ‘in’ and ‘not in’.

Example of python membership operators –

p= ‘Hello WigMarketing team’

q = {5:’x’, 6: ‘y’}

# output is True

print(‘H’ in p)

# output True

print(‘hello’ not in p)

# output: True

Print (5 in q)

### Identity Operators

These operators compare the object not if operands are equal. Here all operands are the same object and same memory location but not equal. Including two variables are equal but not implied.

There are two kinds of python identity operators ‘is’ and ‘is not ’.

Example of the two operators –

A1 = 6

B1 = 6

Output : False

Print (a1 is not b1)

### Bitwise Operators

Normally, used these operators when I need to compare binary numbers. It works as bit-by-bit operations.

Example of the bitwise operator in python

If x = 8

y = 7

Then, 8(decimal)= 1000

And 7 (decimal) = 0111

Hence, x& y = 1111

I think this article would be helpful, I believe in the quality of content. If there are any mistakes please let us know through the comment section. We are eagerly waiting to reply to you with a great update.

`Classes & Object- Oriented programming language in Python`