释放双眼,带上耳机,听听看~!
由于在ASCII码中,\\0是null. \\c, \\D没问题是因为没有对应的转义字符, 碰到\\t就会出错了.可以用raw string, r\'\',
也就是这种:
os.chdir(r\"F:file\\abc/def\"),或者用/代替\\就不会出现转义的情况了。所以呢,以后写代码就用os.chdir(r\"path\")
由于在ASCII码中,\\0是null. \\c, \\D没问题是因为没有对应的转义字符, 碰到\\t就会出错了.可以用raw string, r\'\',
也就是这种:
os.chdir(r\"F:file\\abc/def\"),或者用/代替\\就不会出现转义的情况了。所以呢,以后写代码就用os.chdir(r\"path\")
之前