what is pascal triangle in python code example
Example: pascal's triangle python
def solve(A):
pascals_triangle = []
for i in range(A):
pascals_triangle.append([1]*(i+1))
for i in range(2,A):
for j in range(1,i):
pascals_triangle[i][j] = pascals_triangle[i-1][j-1] + pascals_triangle[i-1][j]
return pascals_triangle