python find index of smallest value in list code example
Example 1: python find smallest value in list
stuff = [37, 7, 19, 29, 5, 13, 31, 17, 23, 11, 3, 2]
print(min(stuff))
# output = 2
Example 2: python index of lowest value in list
if isMinLevel:
return values.index(min(values))
else:
return values.index(max(values))