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

PHOTO EMBED

Wed Aug 26 2020 18:40:27 GMT+0000 (Coordinated Universal Time)

Saved by @arielvol #python

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

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