Discuss / Python / over

www.LC.com

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

    if len(L) == 0:

        return (None, None)

    max = min = L[0]

    print(type(max))

    for x in L[1:]:

        if x>max:

            max = x

        elif x<min:

            min = x

    return (min,max)


  • 1

Reply