Skip to content

Commit f5b1712

Browse files
kovanclaude
andcommitted
gh-137960: Add note about extended slicing in tutorial
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cfeede8 commit f5b1712

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/tutorial/introduction.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@ slicing::
333333
>>> word[42:]
334334
''
335335

336+
Some sequences also support extended slicing with a third "step" parameter:
337+
``s[i:j:k]``. See :ref:`Common Sequence Operations <typesseq-common>` for
338+
details.
339+
336340
Python strings cannot be changed --- they are :term:`immutable`.
337341
Therefore, assigning to an indexed position in the string results in an error::
338342

0 commit comments

Comments
 (0)