def insertion_sort(lst):
size = len(lst)
for i in range(1, size):
key = lst[i]
j = i - 1
while j >= 0 and key < lst[j]:
lst[j + 1] = lst[j]
j -= 1
lst[j + 1] = key
lst = [2, 141, 1, 3, 4, 21, 98, 13, 30, 50]
insertion_sort(lst)
print(lst)
'''
run:
[1, 2, 3, 4, 13, 21, 30, 50, 98, 141]
'''