Discuss / Python / ZUOYE

ZUOYE

Topic source

Lin-林堔

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

    if L == []:

        return (None,None)

    else:

        min = L[0]

        max = L[0]

        for i in range(len(L)):

            if min >= L[i]:

                min = L[i]

            if max <= L[i]:

                max = L[i]

            i = i+1

        return (min, max)


  • 1

Reply