check float python code example
Example 1: py test if is float
check_float = isinstance(25.9, float)
Example 2: check if a string is float python
try:
float(element)
except ValueError:
print "Not a float"
check_float = isinstance(25.9, float)
try:
float(element)
except ValueError:
print "Not a float"