Python-字符串处理函数
时间:2014-09-10 19:48:21
收藏:0
阅读:224
去除空格方法:
" xyz ".strip() # returns "xyz"
" xyz ".lstrip() # returns "xyz "
" xyz ".rstrip() # returns " xyz"
" x y z ".replace(‘ ‘, ‘‘) # returns "xyz"
本文出自 “Mr_Computer” 博客,请务必保留此出处http://caochun.blog.51cto.com/4497308/1550532
原文:http://caochun.blog.51cto.com/4497308/1550532
评论(0)