def quicksort(array): if len(array) < 2: return array else: flag = array[0] less = [] greater = []for i in range(1,len(array)): if array[i] <= flag: less.append(array[i]) else: greater.append(array[i]) return quicksort(less) + [flag] + quicksort(greater)
print(quicksort([10, 5, 2, 3]))