0

Can someone explain to me why in Python 15 is 15 but -15 is not -15? Does that make any sense?

In [1]: -15 is -15
Out[1]: False

In [2]: 15 is 15
Out[2]: True

It looks like -15 is an instance of something.

Cecile
  • 1,553
  • 1
  • 15
  • 26

0 Answers0