https://github.com/python/cpython/commit/a47f1b14f61132454ced424f86b8fd34fa169890 commit: a47f1b14f61132454ced424f86b8fd34fa169890 branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: pablogsal <[email protected]> date: 2026-01-25T17:09:04Z summary:
[3.13] Programming FAQ: fix some punctuaction typos (GH-144058) (#144186) Programming FAQ: fix some punctuaction typos (GH-144058) (cherry picked from commit 03e651d601c7d54ffe93ef1bbd4f66fafb89eded) Co-authored-by: Bartosz Sławecki <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> files: M Doc/faq/programming.rst 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) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
