Discuss / Python / 使用min,max,一句话函数

使用min,max,一句话函数

Topic source

新军

#1 Created at ... [Delete] [Delete and Lock User]

def findMinAndMax(L):

    return (None, None) if L == [] else (min(L), max(L))


  • 1

Reply