Created
March 7, 2018 14:39
-
-
Save fulibacsi/64ea7b38b7eb566fe0e8052aa82caa63 to your computer and use it in GitHub Desktop.
chunker function in python
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
def chunk(seq, size): | |
return (seq[pos:pos + size] for pos in range(0, len(seq), size)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment