python字符串语法

来源:互联网 发布:sql where and 编辑:程序博客网 时间:2024/06/06 02:58

对于一个字符串中有很多反斜杠时,在字符串前边加一个英文字母r

但是,原始字符串最后不能加反斜杠,如果非要在原始字符串结尾添加反斜杠:

str = r'I'm a\ student''\\'

原创粉丝点击