0

Intuitively, I would think ~True would return False, since ~ is the bitwise "not" operator, but this obviously isn't the case. What is really going on here, and how do I get -2 as a return value?

In [0]: ~True                                                                                      
Out[0]: -2

In [1]: ~False                                                                                     
Out[1]: -1
DanDy
  • 361
  • 4
  • 8

0 Answers0