0 points

Checking if a string can be converted to float in Python - Stack Overflow


dashboard

Wed Aug 26 2020 18:40:27 GMT+0000 (UTC)

Posted by @arielvol #python

def isfloat(value):
  try:
    float(value)
    return True
  except ValueError:
    return False
content_copy Copy

https://stackoverflow.com/questions/736043/checking-if-a-string-can-be-converted-to-float-in-python