Explanation of the use of escape characters in Python

Source: Internet
Author: User
This article details the use of escape characters in Python

EscapeWhat it does. Meaning

\\ backslash ( ) back slash

\ 'single-quote (') single quotation mark

\ "double-quote (") double quotation marks

\aASCII Bell (BEL) Bell character

\bASCII backspace (BS) backspace

\fASCII formfeed (FF) paper feed character

\n ASCII linefeed (LF ) line break

\n{name}Character named name in the Unicode database (Unicode only); name is its name.

\ rASCII carriage return (CR ) Carriage return

\ tASCII Horizontal tab (tab ) Horizontal tab

\uxxxxCharacter with 16-bit hex value xxxx (Unicode only) values are 16-bit hexadecimal xxxx characters

\uxxxxxxxxCharacter with 32-bit hex value xxxxxxxx (Unicode only) values are 32-bit hexadecimal xxxx characters

\vASCII vertical tab (VT) Vertical tab

\oooCharacter with octal value ooo is a character of octal Ooo

\xhh Character with hex value Hh value is a hexadecimal number of HH characters

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.