In this Python Operator tutorial, we will learn different types of operators in Python Programming Language, with their syntax and how to use them with examples.
Python Operator is a symbol (such as +, x, etc.) that represents an operation. An operation is an action or procedure which produces a new value from one or more input values called operands. There are two types of operators: unary and binary. The unary operator operates only on one operand, such as negation. On the other hand, the binary operator operates on two operands: addition, subtraction, multiplication, division, exponentiation operators, etc. Consider an expression 3+8, here 3 and 8 are called operands, while ‘+’ is called an operator. The operators can also be categorized into:
• Python Arithmetic Operator
• Python Relational Operator
• Python Assignment Operator
• Python Logical Operator
• Python Membership Operator
• Python Identity Operator
• Python Bitwise Operator
We’ll be covering the following topics in this tutorial:
Python Arithematics operators
Below Python arithmetic operators perform various arithmetic calculations like addition, subtraction, multiplication, division, %modulus, exponent, etc. Table enlists the arithematic operators with a short note on the operators.