pop multiple items from the beginning and end of a list,"['c', 'd', 'e', 'f', 'g']"