mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-23 06:03:07 +03:00
Merge pull request #1927 from TheRakken/patch-1
[python] Minor correction
This commit is contained in:
commit
4f1b8654a0
@ -238,7 +238,7 @@ li.remove(2) # Raises a ValueError as 2 is not in the list
|
||||
li.insert(1, 2) # li is now [1, 2, 3, 4, 5, 6] again
|
||||
|
||||
# Get the index of the first item found
|
||||
li.index(2) # => 3
|
||||
li.index(2) # => 1
|
||||
li.index(7) # Raises a ValueError as 7 is not in the list
|
||||
|
||||
# Check for existence in a list with "in"
|
||||
|
Loading…
Reference in New Issue
Block a user