I have a list with several minimum:
some_list = [1,4,6,4,1,7]
Is there a built-in function or any smart solution to get the index of the minimums?
result = [0,4]
I made it like this so far, but I prefer a shorter/easier to read the solution.
min = 10**10
result = []
for i in range(len(some_list)):
if some_list[i] < min:
min = some_list[i]
result = [i]
elif some_list[i] == min:
result.append(i)