1myList.remove(item) # Removes first instance of "item" from myList
2myList.pop(i) # Removes and returns item at myList[i]
1# removes item with given name in list
2list = [15, 79, 709, "Back to your IDE"]
3list.remove("Back to your IDE")
4
5# removes last item in list
6list.pop()
7
8# pop() also works with an index...
9list.pop(0)
10
11# ...and returns also the "popped" item
12item = list.pop()
1l = list[1, 2, 3, 4]
2l.pop(0) #remove item by index
3l.remove(3)#remove item by value
4#also buth of the methods returns the item
1# removes item with given name in list
2list = [15, 79, 709, "Back to your IDE"]
3list.remove("Back to your IDE")
4
5# removes last item in list
6list.pop()
7
8# pop() also works with an index..
9list.pop(0)
10
11# ...and returns also the "popped" item
12item = list.pop()
1names = ['Boris', 'Steve', 'Phil', 'Archie']
2names.pop(0) #removes Boris
3names.remove('Steve') #removes Steve