Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #41620
| From | Grant Edwards <invalid@invalid.invalid> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Lists and Decimal numbers |
| Date | 2013-03-20 20:00 +0000 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <kid4h6$1hv$1@reader2.panix.com> (permalink) |
| References | <9d8e4386-e6f5-4303-8a6a-be2a16e45ce7@googlegroups.com> <mailman.3567.1363794723.2939.python-list@python.org> <t_n2t.145340$927.82085@fx23.fr7> |
On 2013-03-20, Alister <alister.ware@ntlworld.com> 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.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Lists and Decimal numbers Ana DionĂsio <anadionisio257@gmail.com> - 2013-03-20 08:27 -0700
Re: Lists and Decimal numbers Wanderer <wanderer@dialup4less.com> - 2013-03-20 08:48 -0700
Re: Lists and Decimal numbers Peter Otten <__peter__@web.de> - 2013-03-20 16:52 +0100
Re: Lists and Decimal numbers Alister <alister.ware@ntlworld.com> - 2013-03-20 19:20 +0000
Re: Lists and Decimal numbers Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-03-20 19:53 +0000
Re: Lists and Decimal numbers Grant Edwards <invalid@invalid.invalid> - 2013-03-20 20:00 +0000
Re: Lists and Decimal numbers Alister <alister.ware@ntlworld.com> - 2013-03-20 20:47 +0000
csiph-web