码迷,mamicode.com
首页 > 编程语言 > 详细

python 字符串

时间:2019-01-23 00:13:53      阅读:218      评论:0      收藏:0      [点我收藏+]

标签:sel   led   insert   The   from   rest   method   real   ring   

1 join(self, ab=None, pq=None, rs=None): # real signature unknown; restored from __doc__

    """
Concatenate any number of strings.

The string whose method is called is inserted in between each given string.
The result is returned as a new string.

Example: ‘.‘.join([‘ab‘, ‘pq‘, ‘rs‘]) -> ‘ab.pq.rs‘
a = "你不是美女!"
print(a)
b = "***"
c = b.join(a)
print(c)

——————-
你不是美女!
你***不***是***美***女***!

  

python 字符串

标签:sel   led   insert   The   from   rest   method   real   ring   

原文地址:https://www.cnblogs.com/jijianhu/p/10306598.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!