Getting the index of the returned max or min item using max()/min() on a list

if is_min_level:
    return values.index(min(values))
else:
    return values.index(max(values))

Leave a Comment

tech