摘要: li=[[1,2,3],[2,3,4],[3,4,5],[4,5,6]] xx=[[y*y for y in i] for i in li] aa=[y*y for i in li for y in i] print(aa)#[1, 4, 9, 4, 9, 16, 9, 16, 25, 16, 25, 36] print(xx)#[[1, 4, 9], [4, 9, 16], [9, 16, ... 阅读全文
posted @ 2019-06-22 15:46 青春叛逆者 阅读(129) 评论(0) 推荐(0) 编辑