0
What's the meaning of this operator "~"
Example for description please
2 odpowiedzi
+ 3
~n = -n - 1
~9 = -9 - 1 = -10
~-4 = -(-4) - 1 = 3
+ 2
It is the bitwise operator,
Here provide the details,
https://wiki.python.org/moin/BitwiseOperators
https://realpython.com/python-operators-expressions/