I am newbie in Python ... I am dealing with an array of 10 elements A[0,10] trying to do this loop:
for i in range(1, 9):
C.append((A[i+1]-A[i-1])/2)
to find the average value of each point...
afterwards If I wish to print the results :
print(i, A[i], C[i])
print(i, A[i], C[i-2])
the second print is only working, the first is not.. please why this? And I need also to define the first and the last value of C[1] and C[10] and I can't do that because the first value is the C[-2] which is C[9] ...
if someone has any idea how to solve it....