From 4a6bd35d5727862665ecc815a1ca6f962cb18418 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Tue, 13 Oct 2020 22:37:49 +0300 Subject: [PATCH] Update chunk_into_n.md --- snippets/chunk_into_n.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/snippets/chunk_into_n.md b/snippets/chunk_into_n.md index 7dcb80feb..e4a0b790a 100644 --- a/snippets/chunk_into_n.md +++ b/snippets/chunk_into_n.md @@ -3,11 +3,11 @@ title: chunk_into_n 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`. +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. ```py