Discuss / Python / 作业

作业

Topic source

hfeiiy

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

南丁叔叔

#2 Created at ... [Delete] [Delete and Lock User]

赞,简单易懂


  • 1

Reply