You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Doc/tutorial/introduction.rst
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -184,12 +184,11 @@ If you don't want characters prefaced by ``\`` to be interpreted as
184
184
special characters, you can use *raw strings* by adding an ``r`` before
185
185
the first quote::
186
186
187
-
>>> print('C:\some\name') # here \n means newline, and \s means nothing!
188
-
<python-input-0>:1: SyntaxWarning: "\s" is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\s"? A raw string is also an option.
189
-
C:\some
187
+
>>> print('C:\this\name') # here \t means tab, \n means newline
188
+
C: his
190
189
ame
191
-
>>> print(r'C:\some\name') # note the r before the quote
192
-
C:\some\name
190
+
>>> print(r'C:\this\name') # note the r before the quote
191
+
C:\this\name
193
192
194
193
There is one subtle aspect to raw strings: a raw string may not end in
0 commit comments