♦ Assignment Operators in Python
♣ Example2: Assignment Operators in Python
Assignment Operations in Python are used for assignment of (values)/(variable values) to variables.Operator@Working |
---|
=@Data Assignment |
+=@Addition Increment |
-=@Subtraction Decrement |
*=@Multiplication Increment |
/=@Division Decrement |
%=@Modulo Assignment |
//=@Flooring Assignment |
**=@Exponentiation Assignment |
&=@AND Assignment |
|=@OR Assignment |
^=@XOR Assignment |
~=@NOT Assignment |
>>=@Zero fill left shift Assignment |
<<=@Signed right shift Assignment |
Example
Input:
Output: