Python-杨辉三角输出
今天学习廖雪峰老师的python,学习到了生成器,最后老师给了一道题输出杨辉三角# -*- coding: utf-8 -*-def triangles():# 期待输出:# [1]# [1, 1]# [1, 2, 1]# [1, 3, 3, 1]# [1, 4, 6, 4, 1]# [1, 5, 10, 10, 5, 1]# [1, 6, 15, 20, 15, 6, 1]...