Discuss / Python / 迭代作业

迭代作业

Topic source

星辰德法

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

  • 1

Reply