File tree 1 file changed +9
-11
lines changed
1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -197,21 +197,19 @@ and workarounds.
197
197
String literals can span multiple lines. One way is using triple-quotes:
198
198
``"""...""" `` or ``'''...''' ``. End of lines are automatically
199
199
included in the string, but it's possible to prevent this by adding a ``\ `` at
200
- the end of the line. The following example::
201
-
202
- print("""\
200
+ the end of the line. In the following example, the initial newline is not
201
+ included::
202
+
203
+ >>> print("""\
204
+ ... Usage: thingy [OPTIONS]
205
+ ... -h Display this usage message
206
+ ... -H hostname Hostname to connect to
207
+ ... """)
203
208
Usage: thingy [OPTIONS]
204
209
-h Display this usage message
205
210
-H hostname Hostname to connect to
206
- """)
207
-
208
- produces the following output (note that the initial newline is not included):
209
211
210
- .. code-block :: text
211
-
212
- Usage: thingy [OPTIONS]
213
- -h Display this usage message
214
- -H hostname Hostname to connect to
212
+ >>>
215
213
216
214
Strings can be concatenated (glued together) with the ``+ `` operator, and
217
215
repeated with ``* ``::
You can’t perform that action at this time.
0 commit comments