Found a related question here on SO itself.
Python developers prefer to not check types but do a type specific operation and catch a TypeError
exception. But if you don't know the type then you have the following.
>>> i = 12345
>>> type(i)
>>> type(i) is int
True