From: Dan Nachbar Date: 2011-09-11T18:33:37+09:00 Subject: Re: How do I make output generate a float without an excess numbers of decimal places? On Sep 11, 2011, at 5:05 AM, Kane Williams wrote: ... > If days is a large number, say a year, it usually ends up with a number > like 7.4799999999999999984. Is there a way to fix this? Perhaps chopping > off after 2 decimal places in a string? Thanks in advance! > You might try using the % instance method of String. For example: "%.2f" % (1.0/3) => "0.33" Dan Nachbar