Discuss / Python / 已验证可行

已验证可行

Topic source

tengxun28

#1 Created at ... [Delete] [Delete and Lock User]
if len(L) == 0:
    return (None,None)
small=L[0]
big=L[0]
for item in L:    
    small = min(small,item);
    big = max(big,item);
return (small, big)

  • 1

Reply