<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># Written by Eric Martin for COMP9021


def insertion_sort(L):
    for i in range(1, len(L)):
        j = i
        while j and L[j - 1] &gt; L[j]:
            L[j - 1], L[j] = L[j], L[j - 1]
            j -= 1
</pre></body></html>