Discuss / Python / 练习

练习

Topic source

與生懼來

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

    if len(L) == 0:

        return (None, None)

    else:

        max=min=L[0]

        for i in L:

            if i < min:

                min = i

            if i > max:

                max = i

        return(min,max)


  • 1

Reply