Discuss / Python / 交作业

交作业

Topic source

chengww5217

#1 Created at ... [Delete] [Delete and Lock User]
    min = None
    max = None
    if len(L) > 0:
        for index, x in enumerate(L):
            if index == 0:
                min = x
                max = x
            elif x < min:
                min = x
            elif x > max:
                max = x
    return (min, max)

  • 1

Reply