mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
#18403: merge with 3.3.
This commit is contained in:
commit
d95bb3f981
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
'Py'
|
||||
>>> word[2:5] # characters from position 2 (included) to 4 (excluded)
|
||||
>>> word[2:5] # characters from position 2 (included) to 5 (excluded)
|
||||
'tho'
|
||||
|
||||
Note how the start is always included, and the end always excluded. This
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue