So to speak, I have a list like:
my_list = [12, 13, 51, 21, 22, 58, 45.1, 34.2, 56, 6, 58, 58]
So the maximum number in this is obviously 58, but I don't just want to return one 58, I want a list of all indexes with that maximum number.
Basically for this I want to get the result [5, 10, 11]
I know that if I want the maximum number I can do my_list.index(max(my_list)), but that just gives me the first index.
Any tips? In addition, I want to stick to simple methods, such as sort, max, len, etc.
source
share