As we know that enumerate function can be use to find the in index of a value in list or hashmap. My question is can we specify the ending index of list. As the code is provided if anyone can help me to solve this problem. I will be very thankful to him
[i for i, key in enumerate(sorted_d) if key[1] == sortedVotes[0][0]]