字母前加r标识raw string,也叫原始字符串常量 1、正则表达式,规避反斜杠的转义 a = re.compile(r'\s*) 2、系统路径,防止路径中\t被转义 path = r'D:\text'