Given a list of numbers, I am trying to write a code that finds the difference between consecutive elements. For instance, A = [1, 10, 100, 50, 40] so the outp
A = [1, 10, 100, 50, 40]
[abs(j-A[i+1]) for i,j in enumerate(A[:-1])]