#python 2.7 def quick_sort(L): if len(L) <= 1: return L else: return quick_sort([lt for lt in L[1:] if lt<L[0]])+[L[0]]+ quick_sort([ge for ge in L[1:] if ge>=L[0]])