python 笔记(二)type() isinstance()

type():返回参数的数据类型       例:type(2)   返回<class 'int'>

 isinstance():返回true or false        比较参数是否是某个类型    例:a="你好"      isinstance(a,str)   返回true

posted @ 2017-10-27 16:41  walker_2017  阅读(162)  评论(0)    收藏  举报