I have to convert exponential strings, like 6.5235375356299998e-07,
to a float value, and display the result of my computation like 0.00000065235…
How can I do this in a Python program?
I have to convert exponential strings, like 6.5235375356299998e-07 , to a float value, and
Share
6.5235375356299998e-07is a perfectly legal float even if there is anein it. You can do the whole calculation with it:In the second case, many digits will disappear because of the precision of a python’s float.
If you need the string representation without
e, try this:but it will become a string and you won’t be able to do any calculus with it any more.