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 +<
+<
Your actual code shouldn't work, you are missing whitespaces at the end of "lines" (eg: role.descr as roleFROM...)
role.descr as roleFROM...
There is triplequotes for multiline string:
string = """line line2 line3"""
It will contain the line breaks and extra spaces, but for SQL that's not a problem.