def SciNoteToFloat(x): '''Takes a string writen in scientific notation and returns a float''' x = x.lower() x = x.partition("e") return (float(x[0])) * (int("1" + "0" * (-1 * int(x[2])))) mynum = "0.223E-7" print SciNoteToFloat(mynum)
print '%13.11f' % float('.0340344E-4') '0.00000340344'
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.