六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 43|回复: 0

Python中的split 小细节

[复制链接]

升级  54.67%

32

主题

32

主题

32

主题

秀才

Rank: 2

积分
132
 楼主| 发表于 2013-1-28 19:42:13 | 显示全部楼层 |阅读模式
Python中的split有两个: str.split()   os.path.split()


1 str.split([seq [,maxsplit]])   我们最常用到的!

help 信息如下:

 
<div class="quote_div">split(...)
     S.split([sep [,maxsplit]]) -> list of strings

     Return a list of the words in the string S, using sep as the
     delimiter string.  If maxsplit is given, at most maxsplit
     splits are done. If sep is not specified or is None, any
     whitespace string is a separator.
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表