Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104171 > unrolled thread
| Started by | "Sven R. Kunze" <srkunze@mail.de> |
|---|---|
| First post | 2016-03-06 20:55 +0100 |
| Last post | 2016-03-06 20:55 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: reversed(zip(...)) not working as intended "Sven R. Kunze" <srkunze@mail.de> - 2016-03-06 20:55 +0100
| From | "Sven R. Kunze" <srkunze@mail.de> |
|---|---|
| Date | 2016-03-06 20:55 +0100 |
| Subject | Re: reversed(zip(...)) not working as intended |
| Message-ID | <mailman.1.1457294135.2226.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web