I have a large file with numbers in the form of 6,52353753563E-7 . Thus, an exponent is present on this line. float() dies from this.
While I could write my own code to pre-process the string into something that float() might have, I'm looking for a Python way to convert them to float (something like a format string passed somewhere). I have to say that I am surprised that float() cannot handle strings with such an exponent, this is pretty common stuff.
I am using python 2.6, but 3.1 is an option if necessary.
python
Lucas
source share