Discuss / Python / 交作业

交作业

Topic source

轩辕泽霖

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

    if len(L)>0:

        max=L[0]

        min=L[0]

        for x in L:

            if x > max:

                max=x

            elif x < min:

                min =x

        return (min,max)        

    return (None, None)


  • 1

Reply