summaryrefslogtreecommitdiffhomepage
path: root/python3.html.markdown
diff options
context:
space:
mode:
authorLouis Christopher <louis9171@outlook.com>2015-11-21 19:45:50 +0530
committerLouis Christopher <louis9171@outlook.com>2015-11-21 19:45:50 +0530
commit69e1ee4ad0a90a05253897bb4252de85111fa22c (patch)
tree0e9ffc74a71017ccc79cf05e70b7fd3d63ffc6d8 /python3.html.markdown
parent30e364f4108fc077343a8722f3d80150f0d250fe (diff)
parent3c4a2ff91c6d52ccc928e1c26a28e1fdcbc7c064 (diff)
Merge pull request #1 from louis9171/louis9171-python3
Fixed erroneous output and added a little clarity on the matter
Diffstat (limited to 'python3.html.markdown')
-rw-r--r--python3.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/python3.html.markdown b/python3.html.markdown
index 3ba57738..8cc03320 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -224,8 +224,8 @@ li.remove(2) # Raises a ValueError as 2 is not in the list
# Insert an element at a specific index
li.insert(1, 2) # li is now [1, 2, 3] again
-# Get the index of the first item found
-li.index(2) # => 3
+# Get the index of the first item found matching the argument
+li.index(2) # => 1
li.index(4) # Raises a ValueError as 4 is not in the list
# You can add lists