这篇文章详解python中的转义字符的用法
escape what it does. 含义
\\ backslash () 反斜杠
\’ single-quote (‘) 单引号
\” double-quote (“) 双引号
\a ascii bell (bel) 响铃符
\b ascii backspace (bs) 退格符
\f ascii formfeed (ff) 进纸符
\n ascii linefeed (lf) 换行符
\n{name} character named name in the unicode database (unicode only) unicode数据库中的字符名;name就是它的名字
\r ascii carriage return (cr) 回车符
\t ascii horizontal tab (tab) 水平制表符
\uxxxx character with 16-bit hex value xxxx (unicode only) 值为16位十六进制xxxx的字符
\uxxxxxxxx character with 32-bit hex value xxxxxxxx (unicode only) 值为32位十六进制xxxx的字符
\v ascii vertical tab (vt) 垂直制表符
\ooo character with octal value ooo 值为八进制ooo的字符
\xhh character with hex value hh 值为十六进制数hh的字符
以上就是详解python中的转义字符的用法的详细内容,更多请关注 第一php社区 其它相关文章!