python list pop multiple
# Removes (Pops) the last 6 items from a list del myList[-6:] # Removes the second item from a list (index starts at 0) myList.pop(1) # Slices the list and keeps only the first 6 items myList = myList[:6]
list pop multiple elements python
mylist=['a','b','c','d','e','f','g','h','i'] newlist = mylist[2:-2]
Source: stackoverflow.com