Buggy python submission (verdict: Runtime Error):
def insertion_sort(target_list, leng):
    '????????????????????????????????\???????????§??????????????????????????¨?????????'
    sorted_list = [target_list.pop(0)]
    for target in target_list[:]:
        print(('{} ' * (leng - 1)).format(*sorted_list,
                                          *target_list[0:-1]), end='')
        print(target_list[-1])
        for i, num in enumerate(sorted_list):
            if num > target:
                sorted_list[i:i] = [target]
                break
        else:
            sorted_list.append(target)
        target_list.pop(0)
    print(('{} ' * (N - 1)).format(*sorted_list[0:-1]), end='')
    print(sorted_list[-1], end='')
N = int(input())
A = [int(s) for s in input().split()]
insertion_sort(A, N)

Fixed submission:
def insertion_sort(target_list):
    sorted_list = list()
    for target in target_list[:]:
        for i, num in enumerate(sorted_list):
            if num > target:
                sorted_list[i:i] = [target]
                break
        else:
            sorted_list.append(target)
        target_list.pop(0)
        print(' '.join(str(s) for s in sorted_list + target_list))

N = int(input())
A = [int(s) for s in input().split()]
insertion_sort(A)

Buggy python submission (verdict: Runtime Error):
def insertion_sort(target_list, leng):
    sorted_list = [target_list.pop(0)]
    for target in target_list[:]:
        print(('{} ' * (leng - 1)).format(*sorted_list,
                                          *target_list[0:-1]), end='')
        print(target_list[-1])
        for i, num in enumerate(sorted_list):
            if num > target:
                sorted_list[i:i] = [target]
                break
        else:
            sorted_list.append(target)
        target_list.pop(0)
    print(('{} ' * (N - 1)).format(*sorted_list[0:-1]), end='')
    print(sorted_list[-1], end='')

N = int(input())
A = [int(s) for s in input().split()]
insertion_sort(A, N)

Fixed submission:
def insertion_sort(target_list):
    sorted_list = list()
    for target in target_list[:]:
        for i, num in enumerate(sorted_list):
            if num > target:
                sorted_list[i:i] = [target]
                break
        else:
            sorted_list.append(target)
        target_list.pop(0)
        print(' '.join(str(s) for s in sorted_list + target_list))

N = int(input())
A = [int(s) for s in input().split()]
insertion_sort(A)

Buggy python submission (verdict: Runtime Error):
def insertion_sort(target_list, leng):
    '????????????????????????????????\???????????§??????????????????????????¨?????????'
    sorted_list = [target_list.pop(0)]
    for target in target_list[:]:
        print(('{} ' * (leng - 1)).format(*sorted_list, *target_list[0:-1]), end='')
        print(target_list[-1])
        for i, num in enumerate(sorted_list):
            if num > target:
                sorted_list[i:i] = [target]
                break
        else:
            sorted_list.append(target)
        target_list.pop(0)
    print(('{} ' * (N - 1)).format(*sorted_list[0:-1]), end='')
    print(sorted_list[-1], end='')

N = int(input())
A = [int(s) for s in input().split()]
insertion_sort(A, N)

Fixed submission:
def insertion_sort(target_list):
    sorted_list = list()
    for target in target_list[:]:
        for i, num in enumerate(sorted_list):
            if num > target:
                sorted_list[i:i] = [target]
                break
        else:
            sorted_list.append(target)
        target_list.pop(0)
        print(' '.join(str(s) for s in sorted_list + target_list))

N = int(input())
A = [int(s) for s in input().split()]
insertion_sort(A)