Discuss / Python / 作业

作业

Topic source

陈蔺川

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

    if L==[]:

        return(None, None)

    else:

        n=L[0]

        m=L[0]

        for i in L:

            if i<=n:

                n=i

        for o in L:

            if o>=m:

                m=o

        return (n, m)


  • 1

Reply