Discuss / Python / ZUOYE

ZUOYE

Topic source



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

     if len(L)==0:

        return (None,None)

    else:

        min = max = L[0]

        for i in L:

             if i<=min:

                  min = i

             if i>=max:

                  max=i

        return (min, max)


  • 1

Reply