If this challenge is too easy for you, check out: 
https://www.codewars.com/kata/5cc89c182777b00001b3e6a2

___

Upside-Down Pyramid Addition is the process of taking a list of numbers and consecutively adding them together until you reach one number.

When given the numbers `2, 1, 1` the following process occurs:
```
 2   1   1
   3   2 
     5
```

This ends in the number `5`.

___

### YOUR TASK

Given the right side of an Upside-Down Pyramid (Ascending), write a function that will return the original list.

### EXAMPLE

```python
reverse([5, 2, 1]) == [2, 1, 1]
```

NOTE: The Upside-Down Pyramid will never be empty and will always consist of positive integers ONLY.

Difficulty: introductory

Starter code:

def reverse(right):
	

Solutions:
def reverse(lst):
    ret = []
    while lst:
        ret.append(lst[-1])
        lst = [a-b for a,b in zip(lst, lst[1:])]
    return ret[::-1]

from functools import reduce
def reverse(r):
    return reduce(lambda a,n: reduce(lambda b,s: b.append(s-b[-1]) or b,reversed(a),[n])[::-1],r,[])

f=reverse=lambda A:len(A)==1and A or f([x-y for x,y in zip(A,A[1:])])+[A[-1]] 

def reverse(right):
    pyramid = []
    
    for index, number in enumerate(right):
        pyramid.append([number])
        if index > 0:
            for i in range(index):
                value = pyramid[index-1][i] - pyramid[index][i]
                pyramid[index].append(value)
    
    last_row = pyramid[-1][::-1]
    
    return last_row

def reverse(right):
    lastr = []
    while right:
        lastr.append(right[-1])
        right = [a-b for a, b in zip(right, right[1:])]       
    return lastr[::-1]

def reverse(right):
    xs = []
    for y in right:
        ys = [y]
        for x in xs:
            ys.append(x - ys[-1])
        xs = ys
    return xs[::-1]

def reverse(right):
    last_row = []
    
    for a in right:
        curr_row = [a]
        for b in last_row:
            a = b - a
            curr_row.append(a)
        
        last_row = curr_row
    
    return last_row[::-1]

def coutingLine(downLine, rightCount):
    upLine = [rightCount]
    for itemDLine in downLine:
        upLine.append(itemDLine - upLine[-1])
    return upLine

def swapList(currentList):
    return list(currentList[-item] for item in range(1, len(currentList)+1))

def reverse(right):
    pyramide = [[right[0]]]
    for index in range(0, len(right) - 1):
        pyramide.append(coutingLine(pyramide[-1], right[index + 1]))
        
    return swapList(pyramide[-1])
    





def reverse(right):
    
    left = [right[-1]]
    k=right
    for i in range(len(right)-1):
        k=list(map(lambda x,y:x-y,k,k[1:]))
        left.append(k[-1])
    left.reverse()
            
    return left

f=reverse=lambda a:a and f([x-y for x,y in zip(a,a[1:])])+[a[-1]]