[SciPy-user] Print number of significant digits ?

Joachim Dahl dahl.joachim@gmail....
Fri Jun 15 04:52:18 CDT 2007


print "%3.2f" %pi

On 6/15/07, Stef Mientki <S.Mientki@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@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070615/1476e16b/attachment.html 


More information about the SciPy-user mailing list