From 83e27020714ae5b799ff2228aa4be838b8050286 Mon Sep 17 00:00:00 2001 From: Rishabh Singh <67859818+rishabh11336@users.noreply.github.com> Date: Wed, 28 May 2025 00:18:04 +0530 Subject: [PATCH] gh-134789: Document del s[i] operation for mutable sequences (GH-134804) [main] Update stdtypes.rst - Added explicit mention of `del s[i]` (item deletion by index) to the Mutable Sequence Types section. - Clarified that this operation removes the item at the specified index from the sequence. - Addresses issue GH-134789. (cherry picked from commit 967f361993c9c97eb3ff3076a409b78ea32938df) Co-authored-by: Rishabh Singh <67859818+rishabh11336@users.noreply.github.com> --- Doc/library/stdtypes.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 2c1ca4627795f3..b279c693a6cc31 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1172,6 +1172,8 @@ accepts integers that meet the value restriction ``0 <= x <= 255``). | ``s[i] = x`` | item *i* of *s* is replaced by | | | | *x* | | +------------------------------+--------------------------------+---------------------+ +| ``del s[i]`` | removes item *i* of *s* | | ++------------------------------+--------------------------------+---------------------+ | ``s[i:j] = t`` | slice of *s* from *i* to *j* | | | | is replaced by the contents of | | | | the iterable *t* | |