Path: csiph.com!usenet.pasdenom.info!aioe.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Neil Cerutti Newsgroups: comp.lang.python Subject: Re: Rounding off Values of dicts (in a list) to 2 decimal points Date: 3 Oct 2013 18:03:17 GMT Organization: Norwich University Lines: 13 Message-ID: References: <0aa3c507-a570-4d39-823d-106ba63b0b70@googlegroups.com> <23564349-7dd1-4d7a-9bfb-8483ddf3335e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: individual.net i8CpqT+iwLDBfnCVWzcwWQAnecau0Wht/JJP2cZKQfNOMYHtZQ Cancel-Lock: sha1:JDBtZ6jTZenOQyPnKsWM4i12pfY= User-Agent: slrn/0.9.9p1/mm/ao (Win32) Xref: csiph.com comp.lang.python:55432 On 2013-10-03, tripsvt@gmail.com wrote: > thekey=[{"a": 80.0, "b": 0.0, "c": 10.0, "d": 10.0}, {"a": > 100.0, "b": 0.0, "c": 0.0, "d": 0.0}, {"a": 80.0, "b": 0.0, > "c": 10.0, "d": 10.0}, {"a": 90.0, "b": 0.0, "c": 0.0, "d": > 10.0}] > > However, at the URL, the values show up as 90.000043278694123 You'll need to convert them to strings yourself before submitting them, by using % formatting or str.format. -- Neil Cerutti