首页 > 代码库 > Python之转义字符表

Python之转义字符表

EscapeWhat it does.含义 
\\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 ASCIICarriage 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的字符

技术分享

本文出自 “abiu的小世界” 博客,请务必保留此出处http://9030540.blog.51cto.com/9020540/1940216

Python之转义字符表