scientific notation with superscript exponent
scientific notation with superscript exponent Question: I’m attempting to format numbers in scientific notation with exponents of base 10, e.g. write 0.00123 as 1.23×10–3, using python 3. I found this great function which prints 1.23×10^-3, but how can the caret-exponent be replaced with a superscript? def sci_notation(number, sig_fig=2): ret_string = “{0:.{1:d}e}”.format(number, sig_fig) a,b = ret_string.split(“e”) …