shell sort def shell_sort(list_02): gap = len(list_02) // 2 while gap > 0: for i in range(gap, len(list_02)): while i > 0: if list_02[i] < list_02[i - gap]: list_02[i], list_02[i - gap] = list_02[i - gap], list_02[i] i -= gap else: break gap //= 2 def main(): list_01 = [2, 4, 55, 1, 6, 28, 54, 55, 19, 95, 48, 65] shell_sort(list_01) print(list_01) if __name__ == '__main__': main() ---------------results of enforcement---------- [1, 2, 4, 6, 19, 28, 48, 54, 55, 55, 65, 95] -----------------------------------------------