第26559题 单选题
下列Python快速排序代码的return语句写法中,错误的是?
def qSort(lst):
    if len(lst) < 2:
        return lst

    pivot = lst[0]
    less = [i for i in lst[1:] if i <= pivot]
    greater = [i for i in lst[1:] if i > pivot]

    return ____________________
A

qSort(less) + qSort(greater) + [pivot]

B

[pivot] + qSort(less) + qSort(greater)

C

qSort(less) + [pivot] + qSort(greater)

D

qSort(less) + pivot + qSort(greater)

程序运行统计
暂无判题统计