Discuss / Python / findMinMax

findMinMax

Topic source

-Otokaze-

#1 Created at ... [Delete] [Delete and Lock User]
    v_min = None
    v_max = None
    for v in L:
        if not v_min or v < v_min:
            v_min = v
        if not v_max or v > v_max:
            v_max = v
    return (v_min, v_max)

  • 1

Reply