Python中的常用转义符
转义符作用含义
\Backslash()反斜杠
\’Single quote(‘)单引号
\”Double-quote(“)双引号
\aASCII bell(BEL)响铃符
\bASCII backspace (BS)退格符
\fASCII formfeed(FF)进纸符
\nASCII linefeed (LF)换行符
\N{name}Character named name in the Unicode database (Unicode only)Unicode数据库中的字符名;name就是它的名字
\r ASCII Carriage Return (CR)回车符
\t ASCIIHorizontal Tab (TAB)水平制表符
\uxxxxCharacter with 16-bit hex value xxxx (Unicode only)值为16位十六进制xxxx的字符
\UxxxxxxxxCharacter with 32-bit hex value xxxxxxxx (Unicode only)值为32位十六进制xxxx的字符
\vASCII vertical tab (VT)垂直制表符
\oooCharacter with octal value ooo值为八进制ooo的字符
\xhhCharacter with hex value hh值为十六进制数hh的字符