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

 

posted @ 2018-04-21 09:55  路边的十元钱硬币  阅读(193)  评论(0编辑  收藏  举报