I'm trying to get the index of the biggest number in a part of the list, like that:
if the list is this:
91 71 52 38 17 14 91 43 58 50 27 29 48
I'm doing this with i = 5. (So I would think my code snippet should have to choose between 14 and 91)
i = linelist.index(max(linelist[i:i+2]))
What I would like after my statement is i= 6 (corresponding to the second occurrence of 91) but it keep giving me 0, for the first occurence of 91. Is there anyway to have my code choosing the index in the part of the list I'm feeding to it?
Thanks