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.
This commit is contained in:
Rishabh Singh 2025-05-28 00:18:04 +05:30 committed by GitHub
parent 79d81f7cba
commit 967f361993
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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* | |