def check_float(string):
 try:
  float(string)
  return True
 except ValueError:
  return False

def check_float ( string ) : try : float ( string ) return True except ValueError : return False
helper function for checking if a string can be converted to a float .