Discuss / Python / gaofei

gaofei

Topic source

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

    if not L:

        return (None, None)

    min = max = L[0]

    for n in L:

        if n < min:

            min = n

        elif n > max:

            max = n

    return (min, max)


  • 1

Reply