I got a list like this: my_list = [5, 9, 3, 4, 1, 8, 7, 6]
And it can have an undefined number of integers in it. I need to perform a calculation between the numbers that ignores the second number and calculate something like this: (5 - 3) + (4 - 8) + 7
and then repeat the process.
I have tried a for loop like this one:
for i in range(0, len(my_list), 2):
print(my_list[i])
But it seems wrong and I don't know how to proceed further.