• Even the last

Question related to mission Even the Last


Number 84 is in array 2 times. First in index 9, second in index 16 and this program doesn't add 84 in lst. I can't understand what i must change in program.

def checkio(array): while True: try: lst = [] for i in array: if array.index(i)%2 == 0: lst.append(array.index(i))
sum1 = sum(lst) sum2 = sum1 * array[-1] return sum2 except IndexError: return 0