Discuss / Python / 习题

习题

Topic source

阿财

#1 Created at ... [Delete] [Delete and Lock User]
def findMinAndMax(l):    if len(l)==0:        return (None,None)    max=min=l[0]    for n in l:        if max<n:            max=n        if min>n:            min=n    return (min,max)

  • 1

Reply