Bitwise XOR Assignment¶
Bitwise XOR assignment operator (^=
) can be used to perform bitwise XOR operation and assign it to a variable.
Syntax
variable ^= expr
Example
a ^= 0
b ^= 1