2015-07-08 (判斷型態) isinstance 791 0 Python 摘要:(判斷型態) isinstance number='10' #判斷變數是否為int if(isinstance(number, int)): #Python 3.# Python 2.# 語法 isinstance(s, basestring) print True else: print False 回首頁