input_array result ind for el in input_array if ind result append el e

1
2
3
4
5
6
7
8
input_array = [2, 7, 3, 4, 5]
result = []
ind = 0
for el in input_array:
if ind % 2 == 0:
result.append(el*2)
else:
result.append(el*3)