Last active
May 10, 2016 10:02
-
-
Save davidchua/a97242da1a4d2bd3eba1185f082ba8b5 to your computer and use it in GitHub Desktop.
Revisions
-
davidchua revised this gist
May 10, 2016 . 1 changed file with 6 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ def chunk(l,n): for i in range(0,len(l),n): yield l[i:i+n] list = [] # chunks chunk(list, 30) -
davidchua created this gist
May 10, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ def chunk(self, l,n): for i in range(0,len(l),n): yield l[i:i+n]