Home > Backend Development > Python Tutorial > What does r mean in python

What does r mean in python

藏色散人
Release: 2019-06-22 13:51:31
Original
11606 people have browsed it

What does r mean in python?

"r" is short for "raw". Look up the word meaning "raw, raw". Therefore, it is not difficult to imagine that in front of a Python string, it means "output the string as is", which means that the elements in the string remain unchanged as they originally looked. Python does not escape some symbols.

What does r mean in python

dos = r"c:\news"
Copy after login

"Like r"c:\news", the string starting with r declares that the thing in the following quotation marks is the original string. Put it inside Any character represents the original meaning of the character.

This method is very useful when setting up the website and website directory structure. When using the original string, there is no need to escape."

Related recommendations: "Python Tutorial"

The above is the detailed content of What does r 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