标签:code range lse app int 生成器 ext bsp next
# 杨辉三角 def triangle(): li = [1] while True: yield li lis = [] lis.extend([li[0]]) for j in range(len(li)-1): lis.append((li[j]+li[j+1])) else: lis.extend([li[0]]) li = lis tri_list = triangle() for i in range(10): print(next(tri_list))
标签:code range lse app int 生成器 ext bsp next
原文地址:https://www.cnblogs.com/ibester/p/11619298.html