python 快速排序
2021-06-20 11:03
标签:quick return for first fir less ret python highlight python 快速排序 标签:quick return for first fir less ret python highlight 原文地址:https://www.cnblogs.com/sea-stream/p/9689048.htmldef quick_sort(qlist):
if qlist == []:
return []
else:
qfirst = qlist[0]
qless = quick_sort([l for l in qlist[1:] if l = qfirst])
return qless + [qfirst] + qmore
qlist = quick_sort([4,5,6,7,3,2,6,9,8])
print(qlist)