def f(L): S = [] for i in range(len(L)-1): S.append(L[i] + L[i+1]) return S