From: Rishabh Singh <67859818+rishabh11336@users.noreply.github.com> Date: Tue, 27 May 2025 18:48:04 +0000 (+0530) Subject: gh-134789: Document del s[i] operation for mutable sequences (#134804) X-Git-Tag: v3.15.0a1~1484 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=967f361993c9c97eb3ff3076a409b78ea32938df;p=thirdparty%2FPython%2Fcpython.git gh-134789: Document del s[i] operation for mutable sequences (#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 #134789. --- diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 31d71031bca1..f0b4b09ff10d 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1214,6 +1214,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* | |