字符串.join(字符串序列)
一目了然:
#!/usr/bin/python # -*- coding: UTF-8 -*- str = "-"; seq = ("a", "b", "c"); # 字符串序列 print str.join( seq ); 输出: a-b-c
参考:
http://www.runoob.com/python/att-string-join.html