社区,
我有一个列表,其中包含不同的字符串(句子,单词...),我想将它们全部组合成一个字符串。我试过了:
kafka = ['Das ist ein schöner Tag.', '>>I would like some ice cream and a big cold orange juice!',...]
''.join(kafka) #but strings stay the same as before
您需要执行以下操作:
kafka = ['Das ist ein schöner Tag.', '>>I would like some ice cream and a big cold orange juice!',...]
s = ''.join(kafka)
s
现在包含您的串联字符串。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句