I am having trouble getting past a limitation of the 'index' function when it is confronted with repeating values.
Specifically, for given values within a dictionary in which are there repeats (like the example below), is there a way to retrieve the index of every occurrence of a value, not just the first one?
example_dict={'ABAB': [9,10,6,6,6]}
example_dict['ABAB'].index(6) # returns 2
My goal is to use these indices later on in my work. So I need to know that 9 is index 0, 10 is index 1, and that 6 is index 2, 3, and 4 in the values (not just 2).
Could someone please provide a tip for a workaround for this? Thank you very much for your help.