Last active
December 30, 2016 02:03
-
-
Save rbiswas4/68f78cff0876f54b9e2061ce21073b7f to your computer and use it in GitHub Desktop.
pairwise reversing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l = [1, 2, 3, 4] | |
x = zip(l[1::2], l[::2]) | |
list(e for t in x for e in t) | |
ll = [] | |
for t in x: | |
for e in t: | |
ll.append(e) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment