Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Lists and Decimal numbers Date: Wed, 20 Mar 2013 20:00:38 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 15 Message-ID: References: <9d8e4386-e6f5-4303-8a6a-be2a16e45ce7@googlegroups.com> NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader2.panix.com 1363809638 1599 64.122.56.22 (20 Mar 2013 20:00:38 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Wed, 20 Mar 2013 20:00:38 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:41620 On 2013-03-20, Alister wrote: > and a list comprehension would streamline things further > > t=[round(x*1.0/60),4 for x in range(1440)] #compatible with V2.7 & V3.0) There's a typo in the above. It should be: t = [round((x*1.0/60),4) for x in range(1440)] -- Grant Edwards grant.b.edwards Yow! On the road, ZIPPY at is a pinhead without a gmail.com purpose, but never without a POINT.