Https://www.codecademy.com/paths/computer-science/tracks/cspath-python-objects/modules/cspath-python-strings/lessons/string-methods/exercises/splitting-strings-iii

Main Question
I’m seeing a backslash " \ " as a start to multi-line strings for the first time in this exercise and I’m just trying to figure out why that is. I know that it’s an escape key but what is it escaping exactly?
16%20PM

Secondary Question
I really struggle finding answers online so if there is a basic way I could have found this information online feel free to point me in the right direction. I promise I’m really trying over here.

https://www.codecademy.com/paths/computer-science/tracks/cspath-python-objects/modules/cspath-python-strings/lessons/string-methods/exercises/splitting-strings-iii

In the current usage it is not an escape sequence, but a continuation operator that allows a line break in the statement.

Technically, we could write, (and some feel we should),

smooth_chorus = """
And if you said, "This life ain't good enough."
I would give my world to lift you up
I could change my life to better suit your mood
Because you're so smooth
"""

Thank you @mtf! That makes more sense to me without the back slash but maybe I should do more reading into what a continuation operator is exactly.

1 Like
>>> print (
	0
	)
0
>>> print ('
	0
	')
       
SyntaxError: EOL while scanning string literal
>>> print ('\
	0
	')
       
SyntaxError: EOL while scanning string literal
>>> print ('\
	0\
	')
	0	
>>>