Here\'s a Python implementation of insertion sort, I tried to follow the values on paper but once the counting variable i gets bigger than len(s) I don\'t know what to do, h
def ins(l): for i in range(1, len(l)): current_index = i current_value = l[i] while current_index > 0 and current_value < l[current_index - 1]: l[current_index] = l[current_index - 1] current_index -= 1 l[current_index] = current_value print(l)