conversion to float python 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
string = "88.88"
print(float(string))
# output
# 88.88