Skip to content

Commit daf6b82

Browse files
authored
Update stdtypes.rst
Issue #134789 Document del s[i] operation for mutable sequences - 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.
1 parent 3f9eb55 commit daf6b82

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
@@ -1218,6 +1218,8 @@ accepts integers that meet the value restriction ``0 <= x <= 255``).
12181218
| | is replaced by the contents of | |
12191219
| | the iterable *t* | |
12201220
+------------------------------+--------------------------------+---------------------+
1221+
| ``del s[i]`` | removes item i from s | |
1222+
+------------------------------+--------------------------------+---------------------+
12211223
| ``del s[i:j]`` | same as ``s[i:j] = []`` | |
12221224
+------------------------------+--------------------------------+---------------------+
12231225
| ``s[i:j:k] = t`` | the elements of ``s[i:j:k]`` | \(1) |

0 commit comments

Comments
 (0)