Dremendo Tag Line

Operator in Python Programming Language

Operators in Python

In this lesson, we are going to look at what is an operator and will learn the names of different types of operators.

Definition of Operator

An operator in Python is a symbol that helps us to perform specific mathematical and logical computations on operands. In other words, we can say that an operator operates the operands.

Now let's see an example for more understanding.

video-poster

Example

a=5
b=9
c=a+b

Here, + is an operator known as the addition operator and variables a, b are operands. The addition operator tells the interpreter to add the value of both the operands a and b and store the result in variable c. So the value of c will be 14.

Python has many built-in operator types, but the most important operator types are:

  • Assignment Operators
  • Arithmetic Operators
  • Relational Operators
  • Logical Operators
  • Identity Operators
  • Membership Operators

We will discuss all the operators in our upcoming lessons.