<human>:  python: rstrip one exact string, respecting order
<bot>: Here is some code to strip the string `.txt` from anywhere in the string `Boat.txt.txt`

"""Boat.txt.txt""".replace('.txt', '')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.