Verb for removing from end or beginning [duplicate]

Following an append or prepend operation, an undo or reverse would express removing an item from the same place.

More generally, verbs like the following are used to express removing something from the end of something: truncate, chop, chomp. Removing from the beginning might be expressed by pop, lop, or behead.

In more detail:
lop, “(transitive, usually with off) To cut off as the top or extreme part of anything, especially to prune a small limb off a shrub or tree, or sometimes to behead someone.” A related word is defalcate, “To cut off; to take away or deduct a part of”.
pop , “Removes the element on top of the stack”; but note that Python's pop “removes and returns the last item in the list” which might be thought of as cutting off a head instead of a tail.
chop, “Chops off the last character of a string and returns the character chopped”. (More generally, chop, meaning “To sever with an axe or similar implement”, can also refer to chopping off heads vs. tails.)
chomp, “This safer version of chop removes any trailing string that corresponds to the current value of $/...”
behead, “To remove the head”. Also see decapitate and decollate, which besides its usual meaning of “To separate the copies of multipart computer printout” has an older meaning, “To behead”.
truncate means “To shorten something as if by cutting off part of it”. Its etymology, «From Latin truncātus, perfect passive participle of truncō (“maim, reduce to a trunk”», is suggestive of cutting off head and limbs. In many contexts today its use is more limited: for example, to truncate a file, a number, or a string means to chop off all of it after a certain distance from the beginning of it. Decaudate (mentioned in tchrist's comment), to de-tail or to remove the tail of, is consonant with this sense of truncate.
splice and slice apply more generally than to either end of something, and can refer to extracting, deleting, replacing middle portions of things as well
• verb apocopate, “To shorten using apocope; to remove the final sound or syllable”
• As mentioned in Janus Bahs Jacquet's comment, the verb form procopate that would correspond to noun procope (loss of beginning sound or syllable) isn't in use, but while of course noun apheresis, “the loss of one or more sounds from the beginning of a word, especially the loss of an unstressed vowel” is well known, a verb form isn't.


If by removing in same place, you mean taking one word out and putting another in its stead, then that would simply be replace, as in search and replace.

On reflection, the title seems clearer than the question itself, so the verb would be truncate