I have a very long query. I would like to split it in several lines in Python. A way to do it in JavaScript would be using several sentences and joining them with a +<
"À la" Scala way (but I think is the most pythonic way as OQ demands):
description = """
| The intention of this module is to provide a method to
| pass meta information in markdown_ header files for
| using it in jinja_ templates.
|
| Also, to provide a method to use markdown files as jinja
| templates. Maybe you prefer to see the code than
| to install it.""".replace('\n | \n','\n').replace(' | ',' ')
If you want final str without jump lines, just put \n
at the start of the first argument of the second replace:
.replace('\n | ',' ')`.
Note: the white line between "...templates." and "Also, ..." requires a whitespace after the |
.