Discuss / Python / 111

尘覀

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

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


  • 1

Reply