0

What's the meaning of this operator "~"

Example for description please

26th Aug 2019, 7:25 AM
harry thas
harry thas - avatar
2 ответов
+ 3
~n = -n - 1 ~9 = -9 - 1 = -10 ~-4 = -(-4) - 1 = 3
26th Aug 2019, 10:18 AM
Seb TheS
Seb TheS - avatar
+ 2
It is the bitwise operator, Here provide the details, https://wiki.python.org/moin/BitwiseOperators https://realpython.com/python-operators-expressions/
26th Aug 2019, 7:29 AM
Uchiha Itachi
Uchiha Itachi - avatar