mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
typo
This commit is contained in:
@@ -382,7 +382,7 @@ ValueError: list.index(x): x not in list</samp></pre>
|
||||
ValueError: list.remove(x): x not in list</samp></pre>
|
||||
<ol>
|
||||
<li>You can also remove an item from a list with the <code>remove()</code> method. The <code>remove()</code> method takes a <em>value</em> and removes the first occurrence of that value from the list. Again, all items after the deleted item will have their positional indices bumped down to “fill the gap.” Lists never have gaps.
|
||||
<li>You can call the <code>remove()</code> method has often as you like, but it will raise an exception if you try to remove a value that isn’t in the list.
|
||||
<li>You can call the <code>remove()</code> method as often as you like, but it will raise an exception if you try to remove a value that isn’t in the list.
|
||||
</ol>
|
||||
|
||||
<h3 id=popgoestheweasel>Removing Items From A List: Bonus Round</h3>
|
||||
|
||||
Reference in New Issue
Block a user