Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python list remove item by value

l = ['Alice', 'Bob', 'Charlie', 'Bob', 'Dave']
print(l)
# ['Alice', 'Bob', 'Charlie', 'Bob', 'Dave']

l.remove('Alice')
print(l)
# ['Bob', 'Charlie', 'Bob', 'Dave']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #list #remove #item
ADD COMMENT
Topic
Name
9+4 =