Using python, I am trying to print floats in the format of 0.####e#. For example, 1234.56 is converted to 0.123456e4 or .321 is converted to 0.321e0 etc. I am surprised that an extensive search has not produced any sample code for this exercise. As far as I can tell, neither Display a decimal in scientific notation or stackoverflow.com/questions/53274821/… address converting a number like 1234.56 into 0.123456e4.
If possible, I would like to use the python f-string to do the conversion. But any solution is very welcomed.