From 964a066ba2cc8f3dea3fd4d14516c6a1f6d36d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20S=C5=82awecki?= Date: Fri, 23 Jan 2026 17:34:21 +0100 Subject: [PATCH] Programming FAQ: fix some punctuaction typos (GH-144058) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 03e651d601c7d54ffe93ef1bbd4f66fafb89eded) Co-authored-by: Bartosz Sławecki Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- Doc/faq/programming.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst index 6f9dfa8616ed44..138a5ca7a7516f 100644 --- a/Doc/faq/programming.rst +++ b/Doc/faq/programming.rst @@ -1226,13 +1226,13 @@ This converts the list into a set, thereby removing duplicates, and then back into a list. -How do you remove multiple items from a list --------------------------------------------- +How do you remove multiple items from a list? +--------------------------------------------- As with removing duplicates, explicitly iterating in reverse with a delete condition is one possibility. However, it is easier and faster to use slice replacement with an implicit or explicit forward iteration. -Here are three variations.:: +Here are three variations:: mylist[:] = filter(keep_function, mylist) mylist[:] = (x for x in mylist if keep_condition)