Discuss / Python / 作业

作业

Topic source
    if L == []:
        return (None, None)
    min = max = L[0]
    for x in L:
        if x < min:
            min = x
        if x > max:
            max = x
    return (min, max)


  • 1

Reply