aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility/chunks.py
diff options
context:
space:
mode:
authorPjotr Prins2016-06-17 06:15:59 +0000
committerPjotr Prins2016-06-17 06:15:59 +0000
commit9ed3c1e6ed99c56d77fd5d90ff42f9acfe7ace68 (patch)
treefabca0ec5073e2c17da425eeeb7e40a9e15c564f /wqflask/utility/chunks.py
parent497b72d3496b9368167616774e58250598d7bd83 (diff)
downloadgenenetwork2-9ed3c1e6ed99c56d77fd5d90ff42f9acfe7ace68.tar.gz
Removed trailing spaces in .py and .js files
Diffstat (limited to 'wqflask/utility/chunks.py')
-rw-r--r--wqflask/utility/chunks.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/wqflask/utility/chunks.py b/wqflask/utility/chunks.py
index 9565fb96..b0e33c08 100644
--- a/wqflask/utility/chunks.py
+++ b/wqflask/utility/chunks.py
@@ -6,21 +6,21 @@ import time
def divide_into_chunks(the_list, number_chunks):
"""Divides a list into approximately number_chunks smaller lists
-
+
>>> divide_into_chunks([1, 2, 7, 3, 22, 8, 5, 22, 333], 3)
[[1, 2, 7], [3, 22, 8], [5, 22, 333]]
- >>> divide_into_chunks([1, 2, 7, 3, 22, 8, 5, 22, 333], 4)
+ >>> divide_into_chunks([1, 2, 7, 3, 22, 8, 5, 22, 333], 4)
[[1, 2, 7], [3, 22, 8], [5, 22, 333]]
- >>> divide_into_chunks([1, 2, 7, 3, 22, 8, 5, 22, 333], 5)
+ >>> divide_into_chunks([1, 2, 7, 3, 22, 8, 5, 22, 333], 5)
[[1, 2], [7, 3], [22, 8], [5, 22], [333]]
>>>
-
+
"""
length = len(the_list)
if length == 0:
return [[]]
-
+
if length <= number_chunks:
number_chunks = length