I have a list in following form:
[0, 0, 0, 0, 1, 1, 1, 0.6, 0.6, 0, 0, 0]
each of the items in the list is a small decimal number. I'm looking for a way of returning the last index position of each group. In the above example it would be something like:
0: 3, 1: 6, 0.6: 8, 0: 11
I'm fairly new to python and I don't really know how to approach this