Skip to content

Commit 83e2702

Browse files
rishabh11336miss-islington
authored andcommitted
pythongh-134789: Document del s[i] operation for mutable sequences (pythonGH-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 pythonGH-134789. (cherry picked from commit 967f361) Co-authored-by: Rishabh Singh <[email protected]>
1 parent c6af7f4 commit 83e2702

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Doc/library/stdtypes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,6 +1172,8 @@ accepts integers that meet the value restriction ``0 <= x <= 255``).
11721172
| ``s[i] = x`` | item *i* of *s* is replaced by | |
11731173
| | *x* | |
11741174
+------------------------------+--------------------------------+---------------------+
1175+
| ``del s[i]`` | removes item *i* of *s* | |
1176+
+------------------------------+--------------------------------+---------------------+
11751177
| ``s[i:j] = t`` | slice of *s* from *i* to *j* | |
11761178
| | is replaced by the contents of | |
11771179
| | the iterable *t* | |

0 commit comments

Comments
 (0)