def insertionSort(arr):
    for i in range(1,len(arr)):
        for j in range(i, 0, -1):
            if arr[j]<arr[j-1]:
                arr[j],arr[j-1]=arr[j-1],arr[j]
            else:
                break
    return arr

print(insertionSort([8,5,6,2,3,0,4]))