摘要: 字符串截取 >>>s = 'hello' >>>s[0:3] 'he' >>>s[:] #截取全部字符 'hello' 消除空格及特殊符号 s.strip() #消除字符串s左右两边的空白字符(包括'\t','\n','\r','') s.strip('0') #消除字符串s左右两边的特殊字符(如' 阅读全文
posted @ 2019-05-21 20:00 小码蚁儿 阅读(356) 评论(0) 推荐(0) 编辑