07-numpy-笔记-join

字符串.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

原文地址:https://www.cnblogs.com/alexYuin/p/8898217.html