python 中type可以获得一个对象的数据类型,isinstance可以判断一个对象的数据类型, ... a = 4 # 使用type if type(a) == int or type(a) == float: print('yes') ...
確定! 回上一頁