>> Right Shift operator
After shifting the empty cells we have to fill with sign bit.( 0 for +ve and 1 for -ve)
print(10>>2) ==>2
0 0 0 0 1 0 1 0
0 0 0 0 0 0 1 0
We can apply bitwise operators for boolean types also
print(True & False) ==>False
print(True | False) ===>True
print(True ^ False) ==>True
print(~True) ==>-2
print(True<<2) ==>4
print(True>>2) ==>0
Assignment Operators:
We can use assignment operator to assign value to the variable.
Eg:
x=10
We can combine asignment operator with some other operator to form compound
assignment operator.
Eg: x+=10 ====> x = x+10
The following is the list of all possible compound assignment operators in Python
+=
-=
*=
/=
%=
//=
**=
&=
|=
^=
nd
DURGASOFT, # 202, 2 Floor, HUDA Maitrivanam, Ameerpet, Hyderabad - 500038,
8 040 – 64 51 27 86, 80 96 96 96 96, 92 46 21 21 43 | [Link]