-6

I have number f = 2.25e-06 and I want to print it in format

 2.250000e-6

can someone help?

1

3 Answers 3

0

Use the scientific format

print("%e.6" %f)
0
'{:.6e}'.format(f) # format f exponentially using a base of 6 decimal places
0

Use

print format(a[0]/a[1], '.8f)

with the '8f' being how many decimal places you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.