PYTHON
LESSON:
PYTHON OPERATORS
✓ Types of Python Operators
PYTHON OPERATORS
• Here's a list of different types of Python operators that we will
learn in this tutorial.
[Link] Operators
[Link] Operators
[Link] Operators
[Link] Operators
[Link] Operators
[Link] Operators
ARITHMETIC
OPERATORS
• Python comes with an extensive standard library of modules.
A module is previously written code that can be imported in a
program.
• The import statement defines a variable for accessing code in a
module. Import statements often appear at the beginning of a
program.
ASSIGNMENT
OPERATORS
Assignment operators are used to assign values to variables.
For example,
Here, = is an assignment operator that assigns 5 to x.
COMPARISON
OPERATORS
Comparison operators compare two values/variables and
return a boolean result: True or False. For example,
Here, the > comparison operator is used to compare whether a is
greater than b or not.
LOGICAL
OPERATORS
Logical operators are used to check whether an expression
is True or False. They are used in decision-making. For example,
Here, and is the logical operator AND. Since both a > 2 and b >=
6 are True, the result is True.