>>> theListOfChars = ['a', 'b', 'x', 'd', 's']>>> ''.join(theListOfChars)'abxds'
顺便说一句, _不要使用
list或
str作为变量名,_因为它们已经是内置函数的名称。
(此外,
charPython中没有。“字符”只是长度为1的字符串。因此,该
''.join方法也适用于字符串列表。)

>>> theListOfChars = ['a', 'b', 'x', 'd', 's']>>> ''.join(theListOfChars)'abxds'
顺便说一句, _不要使用
list或
str作为变量名,_因为它们已经是内置函数的名称。
(此外,
charPython中没有。“字符”只是长度为1的字符串。因此,该
''.join方法也适用于字符串列表。)