def swap_upstairs_list(id1, id2, li):
    """Swap list element id1 with the next until reaches id2 (id1 < id2)."""
    for i in range(id2 - 1, id1 - 1, -1):
        li[i], li[i+1] = li[i+1], li[i]
    return li