Discuss / Python / 作业

作业

Topic source

嗨养车

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

if len(L)==0:    

        return (None, None)

    else:

        a=b=L[0]

        for item in L:

            if a>item:

                a=item

            if b<item:

                b=item

        return (a,b)


  • 1

Reply