You are accessing the list elements and then using them to attempt to index your list. This is not a good idea. You already have an answer showing how you could use indexing to get your sum list, but another option would be to zip
the list with a slice of itself such that you can sum the pairs.
b = [i + j for i, j in zip(a, a[1:])]