@@ -986,8 +986,8 @@ There are various techniques.
986986 f()
987987
988988
989- Is there an equivalent to Perl's chomp() for removing trailing newlines from strings?
990- -------------------------------------------------------------------------------------
989+ Is there an equivalent to Perl's `` chomp() `` for removing trailing newlines from strings?
990+ -----------------------------------------------------------------------------------------
991991
992992You can use ``S.rstrip("\r\n") `` to remove all occurrences of any line
993993terminator from the end of the string ``S `` without removing other trailing
@@ -1005,8 +1005,8 @@ Since this is typically only desired when reading text one line at a time, using
10051005``S.rstrip() `` this way works well.
10061006
10071007
1008- Is there a scanf() or sscanf() equivalent?
1009- ------------------------------------------
1008+ Is there a `` scanf() `` or `` sscanf() `` equivalent?
1009+ --------------------------------------------------
10101010
10111011Not as such.
10121012
@@ -1020,8 +1020,8 @@ For more complicated input parsing, regular expressions are more powerful
10201020than C's ``sscanf `` and better suited for the task.
10211021
10221022
1023- What does ' UnicodeDecodeError' or ' UnicodeEncodeError' error mean?
1024- -------------------------------------------------------------------
1023+ What does `` UnicodeDecodeError `` or `` UnicodeEncodeError `` error mean?
1024+ ----------------------------------------------------------------------
10251025
10261026See the :ref: `unicode-howto `.
10271027
@@ -1036,7 +1036,7 @@ A raw string ending with an odd number of backslashes will escape the string's q
10361036 >>> r'C:\this\will\not\work\'
10371037 File "<stdin>", line 1
10381038 r'C:\this\will\not\work\'
1039- ^
1039+ ^
10401040 SyntaxError: unterminated string literal (detected at line 1)
10411041
10421042There are several workarounds for this. One is to use regular strings and double
0 commit comments