Note that in Python if there is whitespace after the `\` it will be an 
error:

In [1]: s = 'one\
  File "<ipython-input-1-270c132ab6d9>", line 1
    s = 'one\
              ^
SyntaxError: EOL while scanning string literal

I think it's safer to just use the implicit string literal concatenation 
and implicit line continuation:

In [2]: s = (
   ...:     'one'
   ...:     'two'
   ...:     'tree'
   ...: )

In [3]: s
Out[3]: 'onetwotree'

Which lets you order the strings with the desired indentation level, 
without forcing you to write them flush to the left, as in your example.

El martes, 6 de enero de 2015, 4:15:13 (UTC-6), Andreas Lobinger escribió:
>
> Hello colleagues,
>
> is there a counterpart for the string literal split to multiple lines like 
> in python?
>
> d = '09ab\
> eff1\
> a2a4'
>
> Wishing a happy day,
>        Andreas
>
>

Reply via email to