%.4g comes close to what I want, but no cigar. In the examples below,
the first 2 are not scientific notation form.
>>> print "%.4g" % 5.09879870978
5.099
>>> print "%.4g" % .0009874345
0.0009874
>>> print "%.4g" % .000009878
9.878e-006
>>> print "%.4g" % 187686876876238746
1.877e+017
How can I print all numbers in scientific notation form, and
designate the number of significant digits?
Thanks,
Dick Moores
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor