reversed(zip(...)) not working as intended
Sven R. Kunze
srkunze at mail.de
Sun Mar 6 14:55:32 EST 2016
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
More information about the Python-list
mailing list