写一个Python程序，将一个包含整数的列表转换为一个相邻元素之和的新列表。例如，[1,5,10,-3]将会变成[6, 15, 7]。
```
nums = [1, 5, 10, -3]
```
```python
nums = [1, 5, 10, -3]
result = []
for i in range(len(nums)-1):
  result.append(nums[i]+nums[i+1])
  
print(result)
# Output: [6, 15, 7]
```