Bitwise or : Bit « Data Type « Python






Bitwise or

Bitwise or
x = 1        # 0001

x | 2        # bitwise OR: 0011

print x
           
       








Related examples in the same category

1.Bit calculation: shift leftBit calculation: shift left
2.bitwise ANDbitwise AND