[SciPy-user] Print number of significant digits ?

Joachim Dahl dahl.joachim at gmail.com
Fri Jun 15 05:52:18 EDT 2007


print "%3.2f" %pi

On 6/15/07, Stef Mientki <S.Mientki at ru.nl> wrote:
>
> hello,
>
> is there a simple way (some flag or something like that),
> in which you can limit the number of significant digits,
> when using the plain print statement ?
>
> so that you get an output like this:
>
> >>> print pi
> 3.14
>
>
> thanks,
> Stef Mientki
>
> Kamer van Koophandel - handelsregister 41055629  / Netherlands Chamber of
> Commerce - trade register 41055629
>
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20070615/1476e16b/attachment.html>


More information about the SciPy-User mailing list