79822875

Date: 2025-11-17 23:46:23
Score: 0.5
Natty:
Report link

Here is one. it returns a list of row lists:

def listPascal(n):
  row = [1] 
  if n == 0: return [row] # Stop condition 
  for c in range(1,n+1):  # Fill row [1,r..r,1] 
    row += [row[-1]*(n-c+1)//c]
  return listPascal(n-1) + [row] # Recurse 
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Andy Richter