Discuss / Python / 做习题打卡

做习题打卡

Topic source

蜜蜂-Leo

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

  • 1

Reply