How to print a decimal number in scientific notation with Python

2 Answers

0 votes
print("{:.2e}".format(0.000089461))

   
   
   
'''
run:
   
8.95e-05
   
'''

 



answered Feb 19, 2023 by avibootz
0 votes
print("{:.2e}".format(8237457961))
 
    
    
    
'''
run:
    
8.24e+09

'''

 



answered Feb 19, 2023 by avibootz

Related questions

...