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 i in L:

            if i>=a:

                a=i

            if i<=b:

                b=i

        return (b,a)


  • 1

Reply