python中的split函数
2015-08-24 22:50
483 查看
split不带参数的时候,默认以空白符作为分隔符。如下:
输出为
['h', 'h', 'i', 'o', 't']
a = "h h i o t" print a.strip().split()
输出为
['h', 'h', 'i', 'o', 't']
相关文章推荐
- python笔记 6
- Class to connect postgres with python in psycopg2
- Python实现读取目录所有文件的文件名并保存到txt文件代码
- A daemon process class in python
- ant编译脚本执行python
- python之mock
- 有关python中的id,is 等
- 将Python脚本打包成可执行文件
- 将Python脚本打包成可执行文件
- A python tool to static sim.log duration time
- 从错误中学python(5)——list的sort方法
- python-->django使用过程中碰到的异常总结
- python中用filter求素数
- python把str转换为int
- 在python中如何设置当前工作目录
- Python学习笔记:random模块
- python第三方库推荐 - dateutil
- Python 实现递归算法
- python 模块学习--Numpy
- python实现简单爬虫功能