Python
[python] float check
닉의네임
2022. 10. 6. 21:03
반응형
def is_number(x):
try:
f = float(x)
return True
except ValueError as e:
return False
try:
float(element)
except ValueError:
print "Not a float"
check_float = isinstance(25.9, float)
반응형