Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104171
| Path | csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | "Sven R. Kunze" <srkunze@mail.de> |
| Newsgroups | comp.lang.python |
| Subject | Re: reversed(zip(...)) not working as intended |
| Date | Sun, 6 Mar 2016 20:55:32 +0100 |
| Lines | 20 |
| Message-ID | <mailman.1.1457294135.2226.python-list@python.org> (permalink) |
| References | <56DC7727.1090001@mail.de> <20160306123850.6f78ab7c@bigbox.christie.dr> <20160306125153.05527138@bigbox.christie.dr> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de VpeCQ0meAzeHhbUUszlZAA9hT1lag+mKnqKWgG9SZVyg== |
| Return-Path | <srkunze@mail.de> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.088 |
| X-Spam-Evidence | '*H*': 0.82; '*S*': 0.00; 'subject:not': 0.11; ':-/': 0.16; 'list)': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'unittests': 0.16; 'wrote:': 0.16; 'tim': 0.24; 'header:In-Reply- To:1': 0.24; 'looks': 0.29; 'chase': 0.29; 'received:10.0': 0.34; 'best,': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'or,': 0.38; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'some': 0.40; 'skip:u 10': 0.61; 'charset:windows-1252': 0.62; 'more': 0.63; 'results': 0.66; 'duplication': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mail201212; t=1457294133; bh=rjPWG2REUvv6ZIugBdUKrHZgS1stE61wPoL8baLjO1U=; h=Subject:To:References:From:Date:In-Reply-To:From; b=QxEqoWxkMpdmptzVq4VhcWbV1MqtfhcNVgjLefSoM+xqRuXKMrqntYCZOlgC/ESQX hRdM1QLHpiusxcmcORKuWY0lo3ZAXgWhQIejaxo/HMLMTJ6IPGGpTzm1XtFzlb10Jk iPPx/eB1bvXriGnPJAseQArBzZvIzDzbcAH62JqA= |
| In-Reply-To | <20160306125153.05527138@bigbox.christie.dr> |
| X-purgate | clean |
| X-purgate | This mail is considered clean (visit http://www.eleven.de for further information) |
| X-purgate-type | clean |
| X-purgate-Ad | Categorized by eleven eXpurgate (R) http://www.eleven.de |
| X-purgate | This mail is considered clean (visit http://www.eleven.de for further information) |
| X-purgate | clean |
| X-purgate-size | 462 |
| X-purgate-ID | 154282::1457294133-00004575-521E9FA2/0/0 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21 |
| 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> |
| Xref | csiph.com comp.lang.python:104171 |
Show key headers only | View raw
On 06.03.2016 19:51, Tim Chase wrote:
> So it looks like one needs to either
>
> results = reversed(list(zip(...)))
>
> or, more efficiently (doing it with one less duplication of the list)
>
> results = list(zip(...))
> results.reverse()
Nice idea. :) Unfortunately, I used it while drafting some unittests and
I love SHORT oneliners:
for c in reversed(zip(ascii_lowercase, ascii_uppercase)):
...
ooops. :-/
Best,
Sven
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: reversed(zip(...)) not working as intended "Sven R. Kunze" <srkunze@mail.de> - 2016-03-06 20:55 +0100
csiph-web