isinstance(‘content‘, str)
返回True or False。
>>>type(1) <type ‘int‘> #返回整形 >>>type(‘content‘) <type ‘str‘> #返回字符串
>>>type(type(1)) <type ‘type‘> #返回type类型
Py中查看数据类型【转载】
原文:https://www.cnblogs.com/BlueBlueSea/p/10669854.html