The action of the bitwise NOT operator is very simple – it inverts all of the bits, setting ones to zeros and zeros to ones: Simple though that seems, the way that Python uses bignums to represent bit ...
As you would expect, the NOT operator has the highest priority. Notice that there are also corresponding logical operators and, or and not that only work with Boolean values and not bit patterns. If ...