Discuss / Python / 作业

作业

Topic source

    if len(L)==0:

        max=None

        min=None

    else:

        max=L[0]

        min=L[0]

        for n in L:

            if n>max:

                max=n

            if min>n:

                min=n

    return (min,max)


  • 1

Reply