pythonic way of comparing all adjacent elements in a list,A = [(A[i + 1] + A[i]) for i in range(len(A) - 1)]