Skip to content

Commit f165dc9

Browse files
authored
Update python.md (#5418)
1 parent 5134e57 commit f165dc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ li[4] # Raises an IndexError
218218
# You can look at ranges with slice syntax.
219219
# The start index is included, the end index is not
220220
# (It's a closed/open range for you mathy types.)
221-
li[1:3] # Return list from index 1 to 3 => [2, 4]
221+
li[1:3] # Return list from index 1 to 2 => [2, 4]
222222
li[2:] # Return list starting from index 2 => [4, 3]
223223
li[:3] # Return list from beginning until index 3 => [1, 2, 4]
224224
li[::2] # Return list selecting elements with a step size of 2 => [1, 4]

0 commit comments

Comments
 (0)