Add lots of things(including tests)

This commit is contained in:
Rohit Tanwar
2018-02-16 16:09:18 +05:30
parent c7810b00bb
commit fb9176aa91
51 changed files with 308 additions and 7 deletions

7
test/chunk/chunk.py Normal file
View File

@ -0,0 +1,7 @@
from math import ceil
def chunk(arr, size):
return list(
map(lambda x: arr[x * size:x * size + size],
list(range(0, ceil(len(arr) / size)))))