Discuss / Python / 作业打卡

作业打卡

Topic source

leisure_cat

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

  • 1

Reply