python去掉字符串末尾的空格,python去除字符串中的空格
以date='[2017-02-10] '为例
date=' [ 2017-02-10 ] ' print date.strip (' [ ] ' ) printint(date.replace (','''').replace () ) )
以date='[2017-02-10] '为例
date=' [ 2017-02-10 ] ' print date.strip (' [ ] ' ) printint(date.replace (','''').replace () ) )