Discuss / Python / 学到了

学到了

Topic source

雅乐landa

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

    if L==[]:

        return(None,None)    

    else:

        max=min=L[0]

        for i in L:   

            while i>=max:

                max=i

            while i<=min:

                min=i

        return(min,max)


  • 1

Reply