python convert string to float if possible code example
Example 1: check if can convert to float python
try:
float(element)
except ValueError:
print "Not a float"
Example 2: convert string to float python
>>> number='1.1'
>>> float(number)
1.1