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

What does the escape character mean in python

藏色散人
藏色散人Original
2019-06-26 09:11:5010959browse

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'

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!

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