标签:拼接 python python列表 for style nbsp logs log pytho
>>> ls1 = [‘a‘, 1, ‘b‘, 2] >>> ls2 = [str(i) for i in ls1] >>> ls2 [‘a‘, ‘1‘, ‘b‘, ‘2‘] >>> ls3 = ‘‘.join(ls2) >>> ls3 ‘a1b2‘
python列表中的所有值转换为字符串,以及列表拼接成一个字符串
标签:拼接 python python列表 for style nbsp logs log pytho
原文地址:http://www.cnblogs.com/stuqx/p/7291924.html