79779746

Date: 2025-10-01 07:29:08
Score: 1.5
Natty:
Report link

Building on Omri Barel's work, we can use the walrus operator to create this one-liner:

def pascal(n):
    return [x:=1] + [x:=x*(n-k) // (k+1) for k in range(n)]
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: James Porritt