I have a list of values like this one:
L = [2, 5, 6, 8, 10, 13]
I want to calculate the difference between the first two values and store it into a list using the list indexes. Then, calculate the difference between the second and the third and so on...
I tried a loop like this without success:
[(L[i+1] - L[i]) for i in L]