>>> a=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9] >>> a = [i +1 for i in range(10)] >>> a [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
第二模块 3.12 列表生成式
原文:https://www.cnblogs.com/kissfire008/p/11749754.html