[Tutor] Float and decimal spaces

Toon Pieton pytutmail at gmail.com
Fri Aug 3 21:43:26 CEST 2007


Hey all!

My memory seem to have a horrible leak. How does one limit the amount of
decimal spaces for a float? I used to know that...

Example: not 5.398042156, but 5.4 (if I decide to have only one place).

Thanks in advance!
Toon Pieton.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070803/350a9e95/attachment.htm 


More information about the Tutor mailing list