Last active
August 11, 2016 14:57
-
-
Save bergerx/e8b20a2fbd3c47074bf5861b7e2fa598 to your computer and use it in GitHub Desktop.
zip(*(iter(items),)*2)
This file contains 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
items=[1,2,3,4] | |
items --> [1,2,3,4] | |
iter(items) --> <listiterator at 0x7f4d642273d0> | |
(iter(items) ) --> <listiterator at 0x7f4d64227690> | |
(iter(items), ) --> (<listiterator at 0x7f4d64227690>,) | |
(iter(items), ) * 2 --> (<listiterator at 0x7f4d64227590>, <listiterator at 0x7f4d64227590>) | |
zip(* (iter(items),)*2 ) --> zip(<listiterator at 0x7f4d64227590>, <listiterator at 0x7f4d64227590>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment