Discuss / Python / findminandmax

findminandmax

Topic source

杨森-ys

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

    if len(L)==0:

        return(None,None)

    else:

        c=(0)

        b=(10)

        for n in L:

            if n>c:

                c=n

            if n<b:

                b=n

        return(b,c)


  • 1

Reply