Python2.7:測試內部類型及type和isinstance用法區別

# -*- coding: UTF-8 -*- class test1: pass class test2(test1): pass if __name__=="__main__": #判斷類型 a=123 #int print type(a) a=123.1 #float print type(a) a=test1()
相關文章
相關標籤/搜索