Discuss / Python / 记录一下

记录一下

Topic source

綾之桜

#1 Created at ... [Delete] [Delete and Lock User]
def findMinAndMax(L):    min0 = max0 = None    if len(L) == 0:        return min0, max0    for x in L:        if min0 is None or x < min0:            min0 = x        if max0 is None or x > max0:            max0 = x    return min0, max0

  • 1

Reply