字符串. 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
来源: http://www.bubuko.com/infodetail-2569628.html