python中字符串的拼接。
1、
>>> test1 = ["aaa","bbb","ccc","ddd","eee"] >>> test1 ['aaa', 'bbb', 'ccc', 'ddd', 'eee'] >>> "-".join(test1) 'aaa-bbb-ccc-ddd-eee'
2、join的拼接对象可以是任何可迭代对象
>>> test1 = ("111","222","333","444") >>> test1 ('111', '222', '333', '444') >>> "~".join(test1) '111~222~333~444'