At 03:08 AM 3/18/2007, Per Jr. Greisen wrote:
>Hi,
>
>Is there an easy way - a module or method for which you can round 
>off number such as
>
>2.1345 to 2.135

Well, there are

 >>> print "%.3f" % 2.1345
2.135

or

 >>> print round(2.1345, 3)
2.135

Dick Moores


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

Reply via email to