I need some strings of floats in scientific notation such as ['5e-6','1e-5','1.5e-5','2e-5','2.5e-5',...]
.
So I try to generate them with [str(n*1e-6) for n in list(range(5,60,5))]
yet it gives ['4.9999999999999996e-06', '9.999999999999999e-06', '1.4999999999999999e-05',...]
.
Then I try to format them with ["{:.1e}".format(n*1e-6) for n in list(range(5,60,5))]
and it gives ['5.0e-06', '1.0e-05', '1.5e-05', '2.0e-05', '2.5e-05',...]
which are still not what I want.
I wonder is there any simple way to do this other than writing a custom function? Thanks.