Discuss / Python / 交作业

交作业

Topic source

倒吃甘蔗

#1 Created at ... [Delete] [Delete and Lock User]
    if L==[]:
        return (None, None)
    else:
        max=min=L[0]
        for x in L:
            if x<min:
                min=x
            elif x>max:
                max=x
        return (min, max)

  • 1

Reply