Discuss / Python / Test

菜问

#1 Created at ... [Delete] [Delete and Lock User]
    if not L:
        Max = Min = None
    else:
        Max = Min = L[0]
        
    for i in L:
        if i > Max:
           Max = i
        if i < Min:
           Min = i
    return (Min, Max)

  • 1

Reply