📜  将列表中的项目连接到字符串 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:20.930000             🧑  作者: Mango

代码示例1
>>> sentence = ['this','is','a','sentence']
>>> '-'.join(sentence)
'this-is-a-sentence'