def list_to_hp(li: list) -> str:
    """
    Converts a list (used for toolz get_in, assoc_in, update_in) to a hp
    (hierarchy path).

    Input: ['root', 0, 'thing',2]
    Output:   /root/0/thing/2
    """
    assert isinstance(li, list), "The input type for li must be a list."
    assert "/" not in li, "Can't have our path delimiter in our list?"
    return "/" + "/".join([str(x) for x in li])