Home > Backend Development > Python Tutorial > What does the escape character mean in python

What does the escape character mean in python

藏色散人
Release: 2019-08-01 15:33:39
Original
11092 people have browsed it

What does the escape character mean in python

What does the escape character mean in python?

When special characters need to be used in characters, python uses Backslash (\) escape character.

The following table:

Original string

Sometimes we don’t want the escape characters to take effect. We just want to display the original meaning of the string. In this case, we need to use r and R to define raw strings.

For example:

print r'\t\r'
Copy after login

The actual output is "\t\r".

What does the escape character mean in python

Recommended study: "Python Tutorial"

The above is the detailed content of What does the escape character mean in python. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template