RT Show me the Code
def triangles():
b = [1]
while(True):
yield b
b = [1] + [b[i] + b[i+1] for i in range(len(b)-1)] + [1]
n = 0
for idx in triangles():
print(idx)
n = n + 1
if n == 10:
break
2024-02-11 22:51:22
RT Show me the Code
def triangles():
b = [1]
while(True):
yield b
b = [1] + [b[i] + b[i+1] for i in range(len(b)-1)] + [1]
n = 0
for idx in triangles():
print(idx)
n = n + 1
if n == 10:
break
下一篇:Shiro权限控制框架