Return list of pairwise sums of adjacent elements. Example: [1,2,3,4] => [3,5,7]
Implement this function:
def pairwise_sum(lst: list) -> list:
Write the function only — the arguments are read for you and the return value is printed automatically.
Arguments arrive as one Python literal per line, in this order: lst.
Input
[1, 2, 3, 4]
Output
[3, 5, 7]