列表转字符

#列表转字符串(只有字符串):
li = ["ety", "xyz", "hello", "world"]
s = "".join(li)
print(s)


s = ",".join(a)
print(s)

'''
etyxyzhelloworld
ety,xyz,hello,world
'''

 

posted @ 2020-04-23 01:16  learnacode  阅读(147)  评论(0编辑  收藏  举报