0% found this document useful (0 votes)
3 views6 pages

BASIC-OPERATORS in Python

The document outlines the different types of operators in Python, including Arithmetic, Comparison, Assignment, Bitwise, Logical, Membership, and Identity Operators. Each operator type is briefly explained, highlighting their functions and providing examples. This serves as a foundational lesson on how operators manipulate values in Python programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views6 pages

BASIC-OPERATORS in Python

The document outlines the different types of operators in Python, including Arithmetic, Comparison, Assignment, Bitwise, Logical, Membership, and Identity Operators. Each operator type is briefly explained, highlighting their functions and providing examples. This serves as a foundational lesson on how operators manipulate values in Python programming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

LESSON 5:

Basic Operators
Operators are the special symbols that can manipulate the value of
operands.
Python language supports the following types of operators.
• Arithmetic Operators
• Comparison or Relational Operators
• Assignment Operators
• Bitwise Operators
• Logical Operators
• Membership Operators
• Identity Operators

Arithmetic Operators
Arithmetic Operators are used to perform arithmetic operations.
Below table shows the arithmetic operators and examples.
Comparison or Relational Operators
As the name suggests the comparison or relational operators are
useful to compare values.
Below table shows the comparison and relational operators with
examples.
Assignment Operators
Assignment operators are used for assigning values to variables.
Bitwise Operators
Bitwise operators enable us to directly operate or manipulate bits.
Because everything in a computer is represented by bits, that is, a
series of 0’s (zero) and 1’s (one). One of the key usages of bitwise
operators is for parsing hexadecimal colors

Logical Operators
These are useful to check two variables against given condition and
the result will be True or False appropriately.
Membership Operators
Membership operators are useful to test if a value is found in a
sequence, that is, string,
list, tuple, set, or dictionary. There are two membership operators in
Python, ‘in’ and
‘not in.

Identity Operators
Identity operators are useful to test if two variables are present on the
same part of the
memory. There are two identity operators in Python, ‘is’ and ‘is not’.

You might also like