[44.函数-生成器] 需求:有一个列表 [0,1,2,3,4,5,6,7,8,9],对这个列表循环+1 li = [0,1,2,3,4,5,6,7,8,9] li = map(lambda x:x+1, a) li = [0,1,2,3,4,5,6,7,8,9] li = [i+1 for i in range(10)] 不需要写其他代码,可以在列表内完成简单的计算 a = [i*i for i in a] #三元运算符也可以 a = [i if i<5 else i*i for i in a…