python str.join()
来源:互联网 发布:淘宝网店加盟 编辑:程序博客网 时间:2024/05/22 06:42
Python join() 方法用于将序列中的元素以指定的字符连接生成一个新的字符串。其中,序列中的元素应是字符串类型。
join()方法语法:
str.join(sequence)
例子:
>>> str='-'
>>> l=['2016','5','9']
>>> t=('2016','5','9')
>>> str.join(l)
'2016-5-9'
>>> str.join(t)
'2016-5-9
>>> '!'.join('python')
'p!y!t!h!o!n'
>>> ''.join('python')
'python'
1 0
- python str.join()
- python中的str.join()
- python str.join 和 os.path.join
- python之str.join operator.itemgetter
- str.join(iterable) 使用
- Python str
- python-str()
- 二七、str.split('').reverse().join();
- python str解析
- python str 对象
- python str模块学习
- python-str()和 repr()
- python-str函数详解
- python str 转换 list
- Python的str类
- python str unicode
- Python repr str 函数
- python-str方法使用
- 有史以来最困难的题
- web.xml加载顺序
- javah,eclipse配置
- MySQL InnoDB 共享表空间和独立表空间
- sublime text3快捷键
- python str.join()
- 【Tesseract-OCR】在VS2010环境下使用的方法---精简快速入门之总结
- Hadoop之——hadoop2.2.0集群搭建
- 相邻最大差值
- 如何调试Python程序
- 怎么实现EDIUS中“老电影”特效的制作
- 实现一个简单类似linux上cat命令的功能函数
- ViewPager的动画切换效果
- 敏捷开发模式下的质量管理