
def quick_sort(array):"""快速排序Example:>>> myArray = []>>>"""if len(array) < 2:return arrayelse:pivot = array[0]less = [i for i in array[1:] if i <= pivot]greater = [i for i in array[1:] if i > pivot]return quick_sort(less) + [pivot] + quick_sort(greater)
