第26606题 单选
实现支持key排序规则的qSort快速排序函数,空缺处应填入的代码是?

现有qSort()函数暂不支持类似sorted()的key排序规则参数,为实现该功能,补全以下代码的三处空缺:

def qSort(lst,fx = None):
    if len(lst) <= 1:
        return lst
    else:
        Pivot = lst[0]
        if ________:
            Less = [x for x in lst[1:] if ________]
            Greater = [x for x in lst[1:] if ________]
            return qSort(Less,fx) + [Pivot] + qSort(Greater,fx)
        else:
            Less = [x for x in lst[1:] if x <= Pivot]
            Greater = [x for x in lst[1:] if x > Pivot]
            return qSort(Less,fx) + [Pivot] + qSort(Greater,fx)

lstA = [1,2,11,12,21,21,2,3,41,4,3]
lstB = qSort(lstA, lambda x:x % 10)
print(lstA, lstB)
A

fx == None , fx(x) >= fx(Pivot) , fx(x) < fx(Pivot)

B

fx == None , fx(x) >= Pivot , fx(x) < Pivot

C

fx != None , fx(x) >= fx(Pivot) , fx(x) < fx(Pivot)

D

fx != None , fx(x) >= Pivot , fx(x) < Pivot