round off to two decimal & return float

Grant Edwards invalid at invalid.invalid
Sat Mar 30 14:36:53 CET 2013


On 2013-03-30, ????????????????????? <amachu at amachu.me> wrote:
> On Saturday 30 March 2013 02:58 PM, Roland Mueller wrote:
>>
>>
>>
>> I assume you have a numeric value a and want to have a float with 2
>> decimals. This can be achieved with the function round(): 
>
> But I need 10.00 and not 10.0

They're the same number.

Are you asking how to format floating point numbers when they're
displayed?

-- 
Grant





More information about the Python-list mailing list