Q:

check if a string is float python

try:
    float(element)
except ValueError:
    print "Not a float"
1

New to Communities?

Join the community