Arithmetic Operators: We use arithmetic operators to perform arithmetic operations like addition, subtraction, multiplication, and division in python for data science..
We use relational operators to compare the values in a an equation. The output from relational operator is either True or False.
These operators perform the logical function AND and OR.
These operators act on bits and carries out bit by bit operation.
Assignment operators are there to assign values to variables.
- Special Operators: Apart from the above operators, there are certain special operators.
- Identity Operators: Identity operators are is and is not. They are there to find out whether two values are on the same part of memory. However, equality amongst two variables does not imply they are identical.
We will get TRUE if the operands are identical and is is in use. Also, we will get FALSE if the operands are identical and are not is in use.
We use this to find whether a value or variable is in a sequence or not. In and not in belongs to the membership operators.
It will be TRUE if the value is found in the sequence and in is in use. However, it will be TRUE if the value is not present in the sequence and not in is in use.