def canbe_int(x: float= 0):
try:
int(x)
return True
except ValueError:
return False
except TypeError: # None
return False
还是要成系统化
转整数
阅读 41
2023-06-08
def canbe_int(x: float= 0):
try:
int(x)
return True
except ValueError:
return False
except TypeError: # None
return False
还是要成系统化
相关推荐
精彩评论(0)