
    Write a function that updates a client's existing investment portfolio by replacing their last investment allocation with a new set of recommended investment options based on their updated risk profile and financial goals. The function should take the current portfolio allocation list and the new recommended investments list as inputs, modifying the original portfolio by substituting its final position with all elements from the recommendations.
    

    
def replace_list(list1, list2):
    """
    Write a function that updates a client's existing investment portfolio by replacing their last investment allocation with a new set of recommended investment options based on their updated risk profile and financial goals. The function should take the current portfolio allocation list and the new recommended investments list as inputs, modifying the original portfolio by substituting its final position with all elements from the recommendations.
    

    """
def replace_list(list1, list2):
    """
    Write a function that updates a client's existing investment portfolio by replacing their last investment allocation with a new set of recommended investment options based on their updated risk profile and financial goals. The function should take the current portfolio allocation list and the new recommended investments list as inputs, modifying the original portfolio by substituting its final position with all elements from the recommendations.
    

    """
    list1[-1:] = list2
    replace_list = list1
    return replace_list