summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPratik Karki <predatoramigo@gmail.com>2018-02-28 15:44:18 +0545
committerGitHub <noreply@github.com>2018-02-28 15:44:18 +0545
commit51b591a329f9e302cd522a12765f6cce610daaf3 (patch)
tree3308bbac1f1805834aea5517853854ad0160e173
parent99321d9e03bfd76be7d84b982f309e1d3e58b02a (diff)
parent3386171160dd7fc3e4e6e9aaf2d5abfebdb38d6f (diff)
Merge pull request #3022 from aswinsanakan/patch-1
[python3/en] Fix omitting in list and clarified comments
-rw-r--r--python3.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/python3.html.markdown b/python3.html.markdown
index 37987582..153384de 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -209,9 +209,9 @@ li[4] # Raises an IndexError
# The start index is included, the end index is not
# (It's a closed/open range for you mathy types.)
li[1:3] # => [2, 4]
-# Omit the end
+# Omit the beginning and return the list
li[2:] # => [4, 3]
-# Omit the beginning
+# Omit the end and return the list
li[:3] # => [1, 2, 4]
# Select every second entry
li[::2] # =>[1, 4]