Discuss / Python / 交作业

交作业

Topic source

sunbably

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

    if L==[]:

        return (None,None)

    else:

        min=L[0]

        max=L[0]

        for n in L:

            if n<min:

                min=n

            if n>max:

                max=n

        return (min, max)


  • 1

Reply