Discuss / Python / 作业

作业

Topic source

FancyFai

#1 Created at ... [Delete] [Delete and Lock User]
ef findMinAndMax(L):
    if L==[]:
        return(None,None)
    max=L[0]
    min=L[0]
    for i in L:
        if max<i:
            max=i
        if min>i:
            min=i
    return (min,max)

  • 1

Reply