Discuss / Python / 作业

作业

Topic source

兔子先森a

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

def finMinAndMax(L): if len(L) == 0: return (None,None) else: max = min = L[0] for n in L[1:]: if n > max: max = n if n < min: min = n return max, min


  • 1

Reply