Python Escape Character __python

Source: Internet
Author: User

Python uses a backslash (\) to escape characters when special characters need to be used in characters. The following table: original string

Sometimes we don't want the escape character to take effect, we just want to show the original meaning of the string, which is to define the original string with R and R. Such as:

Print R ' \t\r '

The actual output is "\t\r".

escape character profile
\ (at end of line) Line Continuation
\ backslash symbol
\ single quotes
\ double quotes
\a Bell
\b backspace (Backspace)
\e escape
\000 null
\ n line wrap
\v portrait tab
\ t landscape tab
\ r return
\f change page
\oyy octal the number of characters yy represents, for example: \o12 represents a newline
\xyy decimal number yy represents a character, for example: \x0a represents a newline
\other Other characters are exported in normal format

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.