def replace_last(items, value):
    # Make a copy, edit the copy, then return it.
    pass
