-
-
Save anonymous/f9064e4c8790ae037ec6 to your computer and use it in GitHub Desktop.
Split array
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
data = range(15) | |
split_array = lambda _array, colums: \ | |
[_array[i:i + colums] for i in \ | |
xrange(0, len(_array), colums)] | |
print split_array(data, 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment