Sorry If this has already been asked but I can't seem to find the answer I'm looking for, they all have involved using tools we aren't allowed to use yet. The question is I have to use a for loop to go through a list and find the minimum value and then return the index of that value. That part I'm okay with, the issue I'm having is how do I get the program to return all the occurrences of that min value?
Restrictions I can't use anything like enumerate or other such functions, I'm allowed to use the min function but that's it and it has to be done within a for loop.
Any help would be appreciated, thanks!
n = [1, 2, 3, -50, -60, 0, 6, 9, -60, -60]
for i in n:
min_val = []
item = min(n)
item_index = n.index(item)
min_val.append(item_index)
print(min_val)