Discuss / Python / 交作业

交作业

Topic source

逍遥

#1 Created at ... [Delete] [Delete and Lock User]
def findMinAndMax(L):    if len(L) < 2:        return (0, 0)    min = L[0]    max = L[0]    for i in L:        if i > max:            max = i        if i < min:            min = i    return (min, max)print(findMinAndMax([7, 1, 3, 9, 5]))

  • 1

Reply