I am trying to print a number into engineering format with python, but I cannot seem to get it to work. The syntax SEEMS simple enough, but it just doesn\'t work.
It is 2020 now folks! and there is an COVID-19 pandemic. You got to use f-string literals for this type of work:
With python3.6.4 and above, you can do
a = 3e-4 print(f"{a:.0E}")