Why does Python return True when I compare int and float objects which have the same value?
True
int
float
For example:
>&
The == operator compares only the values but not the types. You can use the 'is' keyword to achieve the same effect as using === in other languages. For instance
5 is 5.0
returns False