LoginSignup
0
0

\nを改行として解釈されないようにする

Posted at

# rawを使う
>>> print('namakemono\nmakemono')
namakemono
makemono
>>> print(r'namakemono\nmakemono')
namakemono\nmakemono
>>> 

# Python3以降では接頭辞にrを使う
>>> a = r"\name\desktop"
>>> print(a)
\name\desktop
>>> 
0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0