join将列表转换为字符串

list1 = ["张三","李四","王五"]
a1 = ','.join(list1)
print(a1)
>>> 张三,李四,王五

 

相关文章: