Discuss / Python / 交作业

交作业

Topic source

ミサ

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

  • 1

Reply