Discuss / Python / 作业

作业

Topic source

GARRY2019

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

def findMinAndMax(L):

    if len(L)==0:

        return (None,None)

    max_=L[0]

    min_=L[0]

    for i in L:

        max_=max(max_,i)

        min_=min(min_,i)

    return (min_,max_)


  • 1

Reply