python << >>
#PYTHON BITWISE OPERATORS
OPERATOR DESCRIPTION SYNTAX FUNCTION IN-PLACE METHOD
& Bitwise AND a & b and_(a, b) __and__(self, other)
| Bitwise OR a | b or_(a,b) __or__(self, other)
^ Bitwise XOR a ^ b xor(a, b) __xor__(self, other)
~ Bitwise NOT ~ a invert(a) __invert__(self)
>> Bitwise R shift a >> b rshift(a, b) __irshift__(self, other)
<< Bitwise L shift a << b lshift(a, b) __lshift__(self, other)