Discuss / Python / 好像不是挺简洁的

好像不是挺简洁的

Topic source
n=len(L)
print('lean=',n)
if n==0:
    return (None, None)
else:
    max=L[0]
    min=L[0]
    for x in L:
        if x>max:
            max=x
        if x<min:
            min=x
print(min,max)
return (min,max)

  • 1

Reply