From 97b922c9fc8cc1fdadfbde69786c893775d94a9a Mon Sep 17 00:00:00 2001 From: Andrew Harrington Date: Sun, 6 Jan 2019 22:11:02 -0500 Subject: [PATCH] The nth character is the character at index n+1 The final problem in the section uses this terminology, but the initial definition was inconsistent. --- _sources/Sequences/TheSliceOperator.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_sources/Sequences/TheSliceOperator.rst b/_sources/Sequences/TheSliceOperator.rst index 0bb429f8..7a4bfe6f 100644 --- a/_sources/Sequences/TheSliceOperator.rst +++ b/_sources/Sequences/TheSliceOperator.rst @@ -29,10 +29,10 @@ selecting a character: print(singers[17:21]) -The ``slice`` operator ``[n:m]`` returns the part of the string from the n'th character -to the m'th character, *including the first* but *excluding the last*. -In other words, start with the character at index n and -go up to but *do not include* the character at index m. +The ``slice`` operator ``[n:m]`` returns the part of the string starting +with the character at index n and +go up to but *not including* the character at index m. +Or with normal counting from 1, this is the (n+1)st character up to and including the mth character. If you omit the first index (before the colon), the slice starts at the beginning of the string. If you omit the second index, the slice goes to the