Home > Article > Backend Development > Detailed explanation of the usage of escape characters in Python
This article explains in detail the usage of escape characters in Python
Escape What it does. Meaning
\\ Backslash () Backslash
\' Single-quote (') Single quote
\ " Double-quote (") Double-quote
\a ASCII bell (BEL) Bell symbol
\b ASCII backspace (BS) Backspace character
\f ASCII formfeed (FF) Enter Paper character
\n ASCII linefeed (LF) Line feed character
\N{name} Character named name in the Unicode database (Unicode only) The character name in the Unicode database; name is its name
\r ASCII Carriage Return (CR ) Carriage Return
\t ASCII Horizontal Tab (TAB) Horizontal Tab
\uxxxx Character with 16-bit hex value xxxx (Unicode only) Character with 16-bit hex value xxxx
\Uxxxxxxxx Character with 32 -bit hex value xxxxxxxx (Unicode only) The value is the 32-bit hexadecimal xxxx character
\v ASCII vertical tab (VT) Vertical tab character
\ooo Character with octal value ooo Character with octal value ooo
\xhh Character with hex value hh Character with hex value hh
The above is the detailed content of Detailed explanation of the usage of escape characters in Python. For more information, please follow other related articles on the PHP Chinese website!