Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views1 page

Operators and Expressions in Python

The document explains operators and expressions in Python, defining an operator as a symbol used to perform operations on data and an expression as a collection of values connected by operators. It outlines seven types of operators in Python, including arithmetic, assignment, relational, logical, bitwise, membership, and identity operators. Additionally, it notes the absence of certain unary and ternary operators from other programming languages while highlighting Python's unique ternary operator and shorthand operators.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Operators and Expressions in Python

The document explains operators and expressions in Python, defining an operator as a symbol used to perform operations on data and an expression as a collection of values connected by operators. It outlines seven types of operators in Python, including arithmetic, assignment, relational, logical, bitwise, membership, and identity operators. Additionally, it notes the absence of certain unary and ternary operators from other programming languages while highlighting Python's unique ternary operator and shorthand operators.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

================================================================

Operators and Expressions in Python


================================================================
=>An Operator is a Symbol, which is used to Perform Certain Operation on the Data /
Values / Objects.
=>An Expression is a Collection of Objects / Values Connected with an Operator.
=>In Python Programming, we have 7 Types of Operators. They are

1. Arithmetic Operators
2. Assignment Operator
3. Relational Operators (Comparision Operator)
4. Logical Operators (Comparision Operator)
5. Bitwise Operators--Most IMP
6. Membership Operators
a) 'in' Operator
b) 'not in' Operator
7. Identity Operators
a) 'is' Operator
b) 'is not' Operator
-----------------------------------------------------------------------------------
--------------------------------------------------------------
NOTE1: Python Programming Lang Does not Support Unary Operators Like ++ and --
Operators.
NOTE2: Python Programming Lang Does not Support Ternary Operator of C, C++ and Java
( Varname: Exp1?Exp2:Exp3)
------------------------------------------------------------
NOTE3: Python Programming Supports Its Own Ternary Operator: if..else Operator
NOTE4: Python Programming Supports Short hand Operators Like += -= /= >>=
~=...etc
-----------------------------------------------------------------------------------
--------------------------------------------------------------

You might also like