#18403: fix an off-by-one typo noticed by Xue Fuqiao.
This commit is contained in:
parent
f84e01df31
commit
93dd6934ff
@ -262,7 +262,7 @@ to obtain individual characters, *slicing* allows you to obtain substring::
|
|||||||
|
|
||||||
>>> word[0:2] # characters from position 0 (included) to 2 (excluded)
|
>>> word[0:2] # characters from position 0 (included) to 2 (excluded)
|
||||||
'Py'
|
'Py'
|
||||||
>>> word[2:5] # characters from position 2 (included) to 4 (excluded)
|
>>> word[2:5] # characters from position 2 (included) to 5 (excluded)
|
||||||
'tho'
|
'tho'
|
||||||
|
|
||||||
Note how the start is always included, and the end always excluded. This
|
Note how the start is always included, and the end always excluded. This
|
||||||
|
Loading…
x
Reference in New Issue
Block a user