remover o elemento da lista
>>> a = [0, 2, 3, 2]
>>> a.remove(2)
>>> a
[0, 3, 2]
apagar a lista de elementos python
list.remove(element)
remover o valor da lista python por valor
>>> a = ['a', 'b', 'c', 'd']
>>> a.remove('b')
>>> print a
['a', 'c', 'd']
python como remover elementos de uma lista
# Basic syntax:
my_list.remove(element)
# Note, .remove(element) removes the first matching element it finds in
# the list.
# Example usage:
animals = ['cat', 'dog', 'rabbit', 'guinea pig', 'rabbit']
animals.remove('rabbit')
print(animals)
--> ['cat', 'dog', 'guinea pig', 'rabbit'] # Note only 1st instance of
# rabbit was removed from the list.
# Note, if you want to remove all instances of an element, convert the
# list to a set and back to a list, and then run .remove(element) E.g.:
animals = list(set['cat', 'dog', 'rabbit', 'guinea pig', 'rabbit']))
animals.remove('rabbit')
print(animals)
--> ['cat', 'dog', 'guinea pig']
como remover um elemento de uma lista por python índice
list = [0, 1, 2, 3, 4, 5]
print(list)
# [0, 1, 2, 3, 4, 5]
del list[0]
print(list)
# [1, 2, 3, 4, 5]
del list[-2]
print(list)
# [1, 2, 3, 5]
del list[0:2]
print(list)
# [3, 5]
como remover o elemento do índice específico na lista em python
list.pop(index)