python 字符串分割

字符串分割,可以用split,rsplit方法,通过相应的规则来切割成生成列表对象

info = 'name:haha,age:20$name:python,age:30$name:fef,age:55'
content = info.split('$')
print content
posted @ 2013-08-10 20:23 老王python 阅读(...) 评论(...) 编辑 收藏