``` def triangles(): L = [1] while True : yield L L = [L[x] + L[x+1] for x in range(len (L)-1)] L.insert (0,1) L.append (1)
这个代码简洁,good
Sign in to make a reply
MaxJoey在路上
``` def triangles(): L = [1] while True : yield L L = [L[x] + L[x+1] for x in range(len (L)-1)] L.insert (0,1) L.append (1)