I am writing a program in python where in the function I input a row in Pascals triangle and the function returns the NEXT row in the triangle. Below is what I have so far and am getting really frustrate...I'm new at this and bad at iterating things. Can you help me finish my program?
def pascnext(L):
currentrow = []
if L == []:
return [1]
if L == [1]:
return [1,1]
else:
for i in L:
currentrow[i] = L[i] + L[i-1]
return currentrow