摘要: 1、字符串分割 单个分隔符 'abc'.split('b') >> ['a','c'] 多个分隔符 re.split(r'[b,d]','abcde') >>> ['a','c','e',] 2、 检查字符串开头或结尾 检查一种匹配 'a.txt'.startswith('a') >>> True 阅读全文
posted @ 2018-11-14 17:04 charles7987 阅读(594) 评论(0) 推荐(0) 编辑