Skip to content

Commit 2d67688

Browse files
Simplify example for negative index.
1 parent f33ff0d commit 2d67688

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Doc/reference/datamodel.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,7 @@ built-in function :func:`len` returns the number of items of a sequence. When
310310
the length of a sequence is *n*, the index set contains the numbers 0, 1,
311311
..., *n*-1. Item *i* of sequence *a* is selected by ``a[i]``. Most sequences,
312312
including built-in sequences, interpret negative subscripts by adding the
313-
sequence length. For example, ``a[-2]`` equals ``a[n-2]``, the second to last
314-
item of sequence a with length ``n``.
313+
sequence length. For example, ``a[-1]`` is the last item (``a[n-1]``).
315314

316315
.. index:: single: slicing
317316

0 commit comments

Comments
 (0)