-
-
Save fxpires/e73665c367e21d5316b009b129c48311 to your computer and use it in GitHub Desktop.
array_chunk($arr, $size) version of 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 array_chunk(arr, size): | |
chunks=[arr[x:x+size] for x in xrange(0, len(arr), size)] | |
return chunks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment