摘要: def triangles(n): L=[1] while n>0: n=n-1 yield L L.append(0) L=[L[i-1]+L[i] for i in range(len(L))] for n in triangles(6): print(n) 阅读全文
posted @ 2018-04-02 21:54 Horse-Ma 阅读(233) 评论(0) 推荐(0) 编辑