摘要: 在打开文件的时候open(r'c:\....')加r和不加''r是有区别的'r'是防止字符转义的 如果路径中出现'\t'的话 不加r的话\t就会被转义 而加了'r'之后'\t'就能保留原有的样子在字符串赋值的时候 前面加'r'可以防止字符串在时候的时候不被转义 原理是在转义字符前加'\'例:s=r'\tt'print(s)Output:'\tt's='\tt'print(s)Output:' t' 阅读全文
posted @ 2011-09-18 22:19 Crazy_yiner 阅读(70389) 评论(0) 推荐(7) 编辑
摘要: 忘记里给改过的字符替换掉 自己没有想到两个端点如果中间容纳不下3个字符的时候输出0 后来看了别人的代码 改过这两处才对 GPandaDescriptionWhen I wrote down this letter, you may have been on the airplane to U.S.We have known for 15 years, which has exceeded one-fifth of my whole life. I still remember the first time we went to the movies, the first time we wen 阅读全文
posted @ 2011-09-18 20:35 Crazy_yiner 阅读(826) 评论(0) 推荐(0) 编辑