Discuss / Python / 作业

作业

Topic source

男神的qq

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

if L==[]:

        return (None, None)

    else:

        Max=L[0]

        Min=L[0]

        for x in L:

            if x>=Max:

                Max=x

            if x<=Min:

                Min=x

        return (Min, Max)


  • 1

Reply