def triangles(n): i = [1] for j in range(n): i.append(0) i = [i[o-1]+i[o] for o in range(j+1)] yield i
Sign in to make a reply
好你个洋大树