At 06:17 AM 6/28/2008, Cédric Lucantis wrote:

>>>> '%e' % 1.0
'1.000000e+00'

and to set the number of significant digits (it seems to only set the number
of digits after the comma, so you have to subtract 1 from it) :

>>> '%.3e' % 1.0
'1.000e+00'

Perfect! Thanks.

Dick


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to