Discuss / Python / homework

homework

Topic source

_JasonTong

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

    if L:

        a = L[0]

        b = L[0]   

        for x in L:

            if x > a:

                a = x

            if x < b:

                b = x 

        return (b, a)

    else:

        return (None, None)


  • 1

Reply