Discuss / Python / 作业

作业

Topic source

牧殇3399

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

    if L==[]:

        max=min=None

        return(min,max)

    else:    

        min = max = L[0]

        for x in L:

            if x > max:

                max = x

            if x < min:

                min = x

        return(min, max)


  • 1

Reply