Discuss / Python / 如果L非空,则找最值

如果L非空,则找最值

Topic source

栩棂

#1 Created at ... [Delete] [Delete and Lock User]
def findMinAndMax(L):
    if not L:
        return None,None
    a = min(L)
    b = max(L)    
    return a,b

  • 1

Reply