Una possibile codifica
def insertion_sort(lista):
n = len(lista)
for i in range(1, n):
temp = lista[i]
j = i-1
while(j >= 0) and (lista[j] > temp):
lista[j+1] = lista[j]
j -= 1
lista[j+1] = temp