Home  >  Article  >  Backend Development  >  Detailed explanation of the usage of escape characters in Python

Detailed explanation of the usage of escape characters in Python

高洛峰
高洛峰Original
2017-03-17 16:58:532277browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn