"[1,2,3,4,5] >>> [‘1’,‘2’,‘3’,‘4’,‘5’] _author__ = '未昔' __date__ = '2018/12/17 17:57' a = [1, 2, 3] b = [str(i) ...."
[1,2,3,4,5] >>> [‘1’,‘2’,‘3’,‘4’,‘5’]
_author__ = '未昔' __date__ = '2018/12/17 17:57' a = [1, 2, 3] b = [str(i) for i in a ] print(a,'\n',b)
输出:
列表生成式。
列表生成式。