首页 > 其他 > 详细

string.join(iterable)

时间:2016-01-02 10:25:47      阅读:170      评论:0      收藏:0      [点我收藏+]

  str.join(iterable)

Return a string which is concatenation the  of the strings in the iterable iterable. The separator between elements is the string providing this method.

返回一个以str为间隔,元素是iterable里元素。

>>> a=[a,b,c]
>>> a
[a, b, c]
>>> ‘‘.join(a)
abc
>>>  .join(a)
a b c

>>> ‘s‘.join(a)
‘asbsc‘

 

 

string.join(iterable)

原文:http://www.cnblogs.com/caizhenzhen/p/5094176.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!