python convert e number to float code example
Example 1: check if can convert to float python
try:
float(element)
except ValueError:
print "Not a float"
Example 2: int to float python
a = 5
a = float(a) # int to float
try:
float(element)
except ValueError:
print "Not a float"
a = 5
a = float(a) # int to float