What happened? Why the result is not True?
>>>one=1
>>>type(one)
int
>>>one is int
Flase
What happened? Why the result is not True?
>>>one=1
>>>type(one)
int
>>>one is int
Flase
You have to use the type
function in order to test the type of an object with the is
operator:
>>> one=1
>>> type(one) is int
True
>>>