| Name | .remove() |
||||
|---|---|---|---|---|---|
| Examples |
inventory = ["lamp", "skeleton key", "mystic orb"]
print(inventory) # Prints ["lamp", "skeleton key", "mystic orb"]
inventory.remove("skeleton key")
print(inventory) # Prints ["lamp", "mystic orb"]
| ||||
| Description | Removes the given item from the list. Raises a ValueError exception if the item isn't found. | ||||
| Syntax | a.remove(i) | ||||
| Parameters |
| ||||
| Related |
.insert() .append() .reverse() .index() |
Updated on Mon Sep 21 15:53:25 2020.
If you see any errors or have comments, please let us know.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License