Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #91843
| X-FeedAbuse | http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63 |
|---|---|
| Path | csiph.com!usenet.pasdenom.info!nntpfeed.proxad.net!news.muarf.org!news.roellig-ltd.de!open-news-network.org!cyclone01.ams2.highwinds-media.com!news.highwinds-media.com!voer-me.highwinds-media.com!lightspeed.eweka.nl!lightspeed.eweka.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.035 |
| X-Spam-Evidence | '*H*': 0.93; '*S*': 0.00; 'subject:How': 0.09; 'len(x)': 0.09; 'index': 0.13; 'less,': 0.16; 'selects': 0.16; 'sequence.': 0.16; 'subject:access': 0.16; 'wrote:': 0.16; 'am,': 0.23; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'sequence': 0.27; 'message-id:@mail.gmail.com': 0.28; 'subject:list': 0.28; 'received:google.com': 0.34; 'to:addr:python-list': 0.35; 'but': 0.36; 'subject:: ': 0.37; 'tue,': 0.38; 'to:addr:python.org': 0.39; 'sure': 0.40; 'subject:the': 0.40; 'even': 0.61; 'entire': 0.61; 'matter': 0.63; 'to:name:python': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=KVF0Yp3JADhzubDIsz2Iyj8FjJMOIeag7E7KGzopxQc=; b=OeBt8YTwI1RdnyBSpuDhXKGUeLAW/6XiebYeQuKXf3uFJSq38cmlDiOB9hQNOatVJJ R9iKvPPc24awvNKiI5+1VEztR3svw/FjQqo3VT7l7jEeNNkv3+GG29u0N3TPgL7is8xV RoT7c38xKIratxusr2UY7mmnQiCQSMr1aY63P/5zrEEP47uUL/au+9z3yPLW6LPtpXNh T9SWnpg1htAyAxV/0ChOKNu0K06YtC85pssqUm5jcWowWwYdJoWJAk8cpLKYkuy0Oz/y 4mMhOj65Lmgva0lusSnnX4BujnVQrSHKFU03dQYOIf4T0rXOzy3CTRvUOU//dsQn0Lm9 P0cw== |
| X-Received | by 10.107.136.42 with SMTP id k42mr32121899iod.63.1433254820155; Tue, 02 Jun 2015 07:20:20 -0700 (PDT) |
| MIME-Version | 1.0 |
| In-Reply-To | <18a4709f-47c8-41f7-87d5-08bbb00166b6@googlegroups.com> |
| References | <efe9d48e-9aaf-4e68-aa26-c83da32e80f5@googlegroups.com> <18a4709f-47c8-41f7-87d5-08bbb00166b6@googlegroups.com> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Tue, 2 Jun 2015 08:19:39 -0600 |
| Subject | Re: How to access the low digits of a list |
| To | Python <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.63.1433254823.13271.python-list@python.org> (permalink) |
| Lines | 10 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1433254823 news.xs4all.nl 2842 [2001:888:2000:d::a6]:58979 |
| X-Complaints-To | abuse@xs4all.nl |
| X-Received-Body-CRC | 425347069 |
| X-Received-Bytes | 3374 |
| Xref | csiph.com comp.lang.python:91843 |
Show key headers only | View raw
On Tue, Jun 2, 2015 at 6:35 AM, Rustom Mody <rustompmody@gmail.com> wrote: > For that matter even this works > But I am not sure whats happening or that I like it > >>>> [x[-2:] for x in lines] > ['12', '42', '49', '56', '25', '36', '49', '64', '81', '00'] x[-2:] selects all items in the sequence with index i such that len(x) - 2 <= i < len(x). For a sequence of length 2 or less, that's the entire sequence.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to access the low digits of a list fl <rxjwg98@gmail.com> - 2015-06-02 05:23 -0700
Re: How to access the low digits of a list Joel Goldstick <joel.goldstick@gmail.com> - 2015-06-02 08:32 -0400
Re: How to access the low digits of a list Frank Stutzman <stutzman@cat2.kjsl.com> - 2015-06-02 12:34 +0000
Re: How to access the low digits of a list Rustom Mody <rustompmody@gmail.com> - 2015-06-02 05:35 -0700
Re: How to access the low digits of a list Ian Kelly <ian.g.kelly@gmail.com> - 2015-06-02 08:19 -0600
Re: How to access the low digits of a list Rustom Mody <rustompmody@gmail.com> - 2015-06-03 14:08 -0700
Re: How to access the low digits of a list Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-03 22:41 +0100
Re: How to access the low digits of a list Ian Kelly <ian.g.kelly@gmail.com> - 2015-06-03 16:36 -0600
Re: How to access the low digits of a list Steven D'Aprano <steve@pearwood.info> - 2015-06-04 23:27 +1000
Re: How to access the low digits of a list Steven D'Aprano <steve@pearwood.info> - 2015-06-03 01:11 +1000
csiph-web