myList.remove(item) # Removes first instance of "item" from myList myList.pop(i) # Removes and returns item at myList[i]
myList = ['Item', 'Item', 'Delete Me!', 'Item'] del myList[2] # myList now equals ['Item', 'Item', 'Item']
list.remove(element)
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
# delete by index a = ['a', 'b', 'c', 'd'] a.pop(0) print(a) ['b', 'c', 'd']
myList = ['Item', 'Item', 'Delete Me!', 'Item'] myList.pop(2) # myList now equals ['Item', 'Item', 'Item']