将列表转换成字符串
a = ['h','e','l','l','o']
b = ''.join(a)
print(a)
print(b)
运行结果:
['h', 'e', 'l', 'l', 'o']
hello
字符串对齐输出
转载:
https://blog.csdn.net/beautiful77moon/article/details/88874541?depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1&utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1