From 49c4e295a8b012d981b2c3319ffb847bd7735dc6 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Tue, 13 Oct 2020 19:09:35 +0300 Subject: [PATCH] Update chunk_into_n.md --- snippets/chunk_into_n.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snippets/chunk_into_n.md b/snippets/chunk_into_n.md index 2b5945555..7dcb80feb 100644 --- a/snippets/chunk_into_n.md +++ b/snippets/chunk_into_n.md @@ -5,10 +5,10 @@ tags: list,intermediate Chunks a list into `n` smaller lists. -- Use `math.ceil()` and `len()` to get the size of each chunk. -- Use `list()` and `range()` to create a new list of size `n`. -- Use `map()` to map each element of the new list to a chunk the length of `size`. -- If the original list can't be split evenly, the final chunk will contain the remaining elements. +- Use `math.ceil()` and `len()` to get the size of each chunk. +- Use `list()` and `range()` to create a new list of size `n`. +- Use `map()` to map each element of the new list to a chunk the length of `size`. +- If the original list can't be split evenly, the final chunk will contain the remaining elements. ```py from math import ceil