From 06850a1207ddbd7655229c1e7d0eddec3ff1dd50 Mon Sep 17 00:00:00 2001 From: Marco Milone Date: Sun, 21 Mar 2021 00:20:04 +0100 Subject: [PATCH] Update map_filter.rst Under Reduce 1) changed the "list" name 2) changed a bit the algorithm to underline what is happening --- map_filter.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/map_filter.rst b/map_filter.rst index 9552cf8..9002c20 100644 --- a/map_filter.rst +++ b/map_filter.rst @@ -89,10 +89,11 @@ a basic for loop: .. code:: python - product = 1 - list = [1, 2, 3, 4] - for num in list: - product = product * num + the_list = [1, 2, 3, 4] + the_product = the_list[0] + del the_list[0] + for num in the_list: + the_product = the_product * num # product = 24