print(type(int('10.3'))) 报错如上 原因:int不能够把带小数的字符串转为int型。需要先转化为float型 print(type(int(float('10.3')))) 就可以了