相信积累的力量

python,string,strip,split,join,sub

http://stackoverflow.com/questions/1546226/the-shortest-way-to-remove-multiple-spaces-in-a-string-in-python

The   fox jumped   over    the log.
The fox jumped over the log.


" ".join(foo.split())
re.sub(patten, replace, str)

posted @   ThreeF  阅读(352)  评论(0编辑  收藏  举报
努力加载评论中...

相信积累的力量

点击右上角即可分享
微信分享提示