print type(-10)=="int"
Why does the above code return False?
type(-10) is integer data.
print(type(10) == int)True
If you add double quotes to int, it becomes str, which is of course different from int.
That’s not how it works. . .
type(-10) is int
isinstance(-10,int)
print(type(10) == int)
True
If you add double quotes to int, it becomes str, which is of course different from int.
That’s not how it works. . .