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'
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.