Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit4.readnews.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: round off to two decimal & return float Date: Sat, 30 Mar 2013 13:36:53 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 19 Message-ID: References: <515699DB.8060104@amachu.me> NNTP-Posting-Host: c-24-118-110-103.hsd1.mn.comcast.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reader1.panix.com 1364650613 21082 24.118.110.103 (30 Mar 2013 13:36:53 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Sat, 30 Mar 2013 13:36:53 +0000 (UTC) User-Agent: slrn/0.9.9p1 (Linux) Xref: csiph.com comp.lang.python:42335 On 2013-03-30, ????????????????????? 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