Need explanation please on this quicksort recursive function in python

后端 未结 0 980
孤独总比滥情好
孤独总比滥情好 2020-11-29 06:01

def qsort(list): if not list: return [] else: pivot = list[0] less = [x for x in list[1:] if x < pivot] more = [x for x in list[1:] if x >= pivot] return qsor

相关标签:
回答
  • 消灭零回复
提交回复
热议问题