Discuss / Python / 这么写

这么写

Topic source

    max = min = L[0] if len(L) else None

    for l in L:

        min = l if l < min else min

        max = l if l > max else max

    return (min,max)


  • 1

Reply