def quick_sort(num_list): if len(num_list)<=1: return num_list base=num_list[0] left = [i for i in num_list[1:] if i<base] right = [i for i in num_list[1:] if i>=base] return quick_sort(left)+[base]+quick_sort(right)
def quick_sort(num_list): if len(num_list)<=1: return num_list base=num_list[0] left = [i for i in num_list[1:] if i<base] right = [i for i in num_list[1:] if i>=base] return quick_sort(left)+[base]+quick_sort(right)