Operators in Python
Operators in Python
PYTHON
Operators are the constructs which can manipulate
the value of operands.
Consider the expression 4 + 5 = 9. Here, 4 and 5 are
called operands and + is called operator.
Types of Operator
Python language supports the following types of operators.
● Arithmetic Operators
● Comparison (Relational) Operators
● Assignment Operators
● Logical Operators
● Bitwise Operators
● Membership Operators
● Identity Operators
Let us have a look on all operators one by one.
Python Arithmetic Operators
Assume variable a holds 10 and variable b holds 20, then −
Python Comparison Operators
These operators compare the values on either sides of them and decide the relation among them. They are also called Relational operators.
Assume variable a holds 10 and variable b holds 20, then −