江湖道

庙堂,江湖,学术!

返回顶部
摘要: 1.列表生成式需求:将列表[0,1,2,3,4,5,6,7,8,9]的每一个元素加1方法一:#Author:Anliua = [0,2,3,4,5,6,7,8,9]b = []for i in a:b.append(i+1)a=bprint(a)方法二:#Author:Anliua = [0,2,3,4,5,6,7,8,9]for index,i in enumerate(a): a[ind... 阅读全文
posted @ 2020-04-07 22:18 大江东流水 阅读(198) 评论(0) 推荐(0) 编辑