pl = ['a','b','c','d'] s = '' for p in pl: s += p print(s) # 推荐使用 l = ['abc', 123,45,'xyz'] res = ''.join(str(x) for x in l) # 引号里面时拼接符号 print(res)
pl = ['a','b','c','d'] s = '' for p in pl: s += p print(s) # 推荐使用 l = ['abc', 123,45,'xyz'] res = ''.join(str(x) for x in l) # 引号里面时拼接符号 print(res)