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 +<
+<
For defining a long string inside a dict, keeping the newlines but omitting the spaces, I ended up defining the string in a constant like this:
LONG_STRING = \ """ This is a long sting that contains newlines. The newlines are important. """ my_dict = { 'foo': 'bar', 'string': LONG_STRING }