python字符串拼接方式

一 .join(iterator),后面必须是可迭代对象,例如:字符串,列表,元组 testList = ["1","2"] print(",".join(testList)) #输出 1, 2 idStr = "abcedf" print(",".join(idStr)) #输出 a, b, c,
posted @ 2022-06-10 15:58  江湖凶险  阅读(84)  评论(0编辑  收藏  举报