Operators
Operators are tokens that triggers some computation when applied to variables and other objects in an expression. Variables and objects to which the computation is applied, are called Operands. So an operator requires some Operands to work upon.
The following List gives a brief description of the operators and their function.
Unary Operators
Unary operators are those operators that requires one operands to operate upon.
Following are some unary operators :
+ Unary plus
- Unary minus
~ Unary compliments
Binary Operators
Binary operators are those operators that requires two operands to operate upon.
Following are some Binary operators :
+ Addition
- Subtraction
* Multiplication
/ Division
% Remainder / Modulus
** Exponent (raise to power)
// Floor division
Bitwise Operators
& Bitwise AND
^ Bitwise exclusive OR (XOR)
| Bitwise OR
Shift Operator
<< Shift left
>> Shift right
Identify Operators
is Is the identity same ? \ (equal)
is not Is the identity not same ? \ (or not equal )
Relational Operators
< Less than
> Greater than
<= Less than equal to
>= Greater than equal to
== Equal to
!= Not equal to
Logical Operators
and Logical AND
or Logical OR
Assignment Operators
= Assignment
/= Assign Quotient .e., a/=2 is equal to a=a/2
+= Assign Sum i.e., a+=2 is equal to a=a+2
*= Assign product i.e., a*= 2 is equal to a=a*2
%= Assign Remainder
-= Assign Difference i.e., a-=2 is equal to a=a-2
**= Assign Exponent
// Assign Floor Division
Membership Operators
in Whether variable in sequence
not in Whether variable not in sequence
This is the end of Operators, now we will start with Punctuation
Punctuators
Punctuators are symbols that are used in programming languages to organize sentence structures, and indicate the rhythm and emphasis of expressions, statements, and Program structure.
Most common punctuators of Python programming language are :
' " # \ () {} [] @ , : . =
So this was all about Punctuators in Python.
So we will keep it here for today and meet you in the next post. Don't forget to Follow me to get my latest post Updates.
JAI HIND!!!
VANDE MATARAM!!!!!
Great Information sharing .. I am very happy to read this article .. thanks for giving us go through info.Fantastic nice. I appreciate this post. 经济代写
ReplyDeleteThank you so much...I really appreciate your support for this Website. Please do share this Website. This will help Us a lot in Growing Our Blog.
Delete