Answers for "how to remove a value from a list in python"

12

python how to remove item from list

list.remove(item)
Posted by: Guest on April-12-2020
3

delete element from list value

>>> a=[1,2,3]
>>> a.remove(2)
>>> a
[1, 3]
>>> a=[1,2,3]
>>> del a[1]
>>> a
[1, 3]
>>> a= [1,2,3]
>>> a.pop(1)
2
>>> a
[1, 3]
>>>
Posted by: Guest on May-19-2020
0

delete item from list

listname.remove(element)
Posted by: Guest on October-09-2020

Code answers related to "how to remove a value from a list in python"

Python Answers by Framework

Browse Popular Code Answers by Language