Discuss / Python / 作业

作业

Topic source

greatzues

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

def findMinAndMax(L): if L:
min = max = L[0] for x in L: if x > max: max = x if x < min: min = x return (min,max) else: return(None,None)


  • 1

Reply