摘要: 1 去除两端空格(strip()) a.去除左端空格 lstrip() b.去除右端空格 rstrip() c.去除两端空格 strip() 2 空格替换(replace() 推荐使用) 3 重新组合替换空格(使用split分割字符,使用join重新组合,效率低) 4 正则表达式去空格(用sub() 阅读全文
posted @ 2019-01-13 15:04 TianchiLiu 阅读(2712) 评论(0) 推荐(0) 编辑