python: SyntaxError: EOL while scanning string literal

Alex Gordon picture Alex Gordon · Aug 25, 2010 · Viewed 875.8k times · Source

I have the above-mentioned error in s1="some very long string............"

Does anyone know what I am doing wrong?

Answer

aaronasterling picture aaronasterling · Aug 25, 2010

You are not putting a " before the end of the line.

Use """ if you want to do this:

""" a very long string ...... 
....that can span multiple lines
"""