isinstance, type,即type的__name__属性
C:\>python
Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 10
>>> b = 10.0
>>> c = "a string"
>>> d = u"a utf-8 string"
>>> print(isinstance(a,int))
True
>>> print(isinstance(a,float))
False
>>> print(isinstance(b,float))
True
>>> print(isinstance(c,str))
True
>>> print(isinstance(d,str))
True
>>> type(a)
<class 'int'>
>>> type(d)
<class 'str'>
>>> type(c).__name__
'str'
>>>