"Dick Moores" <[EMAIL PROTECTED]> wrote
>>> print "%.4g" % 5.09879870978
5.099
>>> print "%.4g" % .000009878
9.878e-006

How can I print all numbers in scientific notation form, and designate the number of significant digits?

use %e instead of %g

Alan G

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to