Last active
November 24, 2017 17:29
-
-
Save villasv/a703b0b13dbb22560e59c01be7c408d6 to your computer and use it in GitHub Desktop.
funky way to bulk iterate a collection
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
for batch in zip_longest(*([iter(items)] * 300)): | |
print([i for i in batch if i is not None]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment