Discuss / Python / 交作业了

交作业了

Topic source

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

def findMinAndMax(L):

    if L == []:

        return (None,None)

    min = max = L[0]

    for i in L:

        if i < min:

            min = i

        if i > max:

            max = i

    return (min,max)


  • 1

Reply