def move_left(a, j):
    "isort helper function that moves a[j]"
    x = a.pop(j)
    while j > 0 and a[j-1] > x:
        j -= 1
    a.insert(j, x)

