python list to string

来源:互联网 发布:teamviewer mac 破解版 编辑:程序博客网 时间:2024/06/05 15:21

["a", "b", "c", “d“]

转换成

abcd


"".join(s)

Use the join method of the empty string to join all of the strings together with the empty string in between, like so:

>>> a = ['a', 'b', 'c', 'd']>>> ''.join(a)'abcd'



0 0
原创粉丝点击