diff options
author | Pjotr Prins | 2016-06-17 06:48:01 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-06-17 06:48:01 +0000 |
commit | 93e3878c8b97ecbf28630e4bb3733a29f4cf45aa (patch) | |
tree | ef92de7c75b7899b406e99c97006a7e2b20bd86b /wqflask/utility/chunks.py | |
parent | eb84f7c0e384e08b810e052fd3935f6d977b7ea2 (diff) | |
parent | 10df36b60273d81678f6630c07a2d8e5a6409282 (diff) | |
download | genenetwork2-93e3878c8b97ecbf28630e4bb3733a29f4cf45aa.tar.gz |
Conflict
Diffstat (limited to 'wqflask/utility/chunks.py')
-rw-r--r-- | wqflask/utility/chunks.py | 10 |
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 |