Discuss / Python / ZUOYE

ZUOYE

Topic source

墨染苍瞳

#1 Created at ... [Delete] [Delete and Lock User]
if L == []:
    return (None,None)
else:
    a=L[0]
    b=L[0]
    for n in L:
        if a>=n:
            a=n
        else: 
            a=a
        if b<=n:
            b=n
        else:
            b=b
    return (a,b)

  • 1

Reply