python odebrat prvek ze seznamu
myList.remove(item) # Removes first instance of "item" from myList
myList.pop(i) # Removes and returns item at myList[i]
smazat seznam prvků python
list.remove(element)
python jak odebrat položku ze seznamu
list.remove(item)
odebrat hodnotu ze seznamu python podle hodnoty
>>> a = ['a', 'b', 'c', 'd']
>>> a.remove('b')
>>> print a
['a', 'c', 'd']
python odstranit ze seznamu
l = list[1, 2, 3, 4]
l.pop(0) #remove item by index
l.remove(3)#remove item by value
#also buth of the methods returns the item
jak odstranit konkrétní prvek ze seznamu v Pythonu
# animals list
animals = ['cat', 'dog', 'dog', 'guinea pig', 'dog']
# 'dog' is removed
animals.remove('dog')
# Updated animals list
print('Updated animals list: ', animals)