How to print floating point in scientific format?

sdhyok sdhyok at yahoo.com
Fri Aug 8 15:15:53 EDT 2003


I want to change the DEFAULT behavior of python
to print out all floating points in scientific format?
For instance,

>x=0.01
>print x
1.000000E-2 #Like print "%E"%x

How can I do it?

Daehyok Shin




More information about the Python-list mailing list