Python: Recursive: Pascal Triangle

Write the recursive function pascal_traingle that takes an integer n and return a list of list containing the first nth rows of the Pascal's triangle. More information about the Pascal's triangle can be found here.


pascal_traingle(5) -> [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]]

Test 1    

Test 2    

Test 3    

Test 4    

Test 5    

Test 6    

Test 7    

Test 8