python consecutive numbers difference between

Solutions on MaxInterview for python consecutive numbers difference between by the best coders in the world

showing results for - "python consecutive numbers difference between"
Daniel
09 Feb 2019
1[y-x for x, y in zip(A[:-1], A[1:])] 
2
3>>> A = [1, 10, 100, 50, 40]
4>>> [y-x for x, y in zip(A[:-1], A[1:])]
5[9, 90, -50, -10]